Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] server: prevent parsing docstrings as markdown codeblocks #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mmahrouss
Copy link
Collaborator

No description provided.

@mmahrouss mmahrouss marked this pull request as ready for review November 15, 2024 14:17
@fda-odoo
Copy link
Collaborator

fda-odoo commented Nov 18, 2024

Shouldn't we remove space instead of transforming them into nbsp?
Spaces before comments are there only for the indentation of the documented block. But the documentation we show do not have to be indented

@mmahrouss
Copy link
Collaborator Author

Shouldn't we remove space instead of transforming them into nbsp? Spaces before comments are there only for the indentation of the documented block. But the documentation we show do not have to be indented

Yes that was my first approach.

What was confusing was if I should always trim the spaces from the beginning of lines, that will make us lose some of the formatting of the docstring, right ?

What I could do is remove the common number of spaces on the lines ? but that will not work in all cases tho?

What do you think ?

@fda-odoo
Copy link
Collaborator

I think we can try to remove the common spaces, and see what results it gives us. Actually there is a lot of documentation that has indentations issues, so let's try that already

@mmahrouss mmahrouss force-pushed the prevent-parsing-docstring-codeblock-mdms branch from c92d4ac to a64c686 Compare November 19, 2024 16:51
@mmahrouss
Copy link
Collaborator Author

@fda-odoo

I have a version with common removed spaces, the code is a bit overkill, and I do not really like the result
image
image

As long as there is another indentation, it starts to have the same problem

@fda-odoo
Copy link
Collaborator

Indeed, it's not ok. We still have the syntaxical colors...
Maybe we should not use markdown for comments, but I don't know if we can create a block that do not use markdown :/

@fda-odoo fda-odoo added this to the 0.4.0 milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants