-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
lib/parser: Separate Markdown code from reStructuredText #5240
base: main
Are you sure you want to change the base?
Conversation
This restores the original 'rest' file for reStructuredText output so that it is in a separate function (and file) from Markdown. The reStructuredText output is removed from the Markdown code. While this currently introduces some duplication, it allows for further modifications of Markdown without a need to modify the reStructuredText at the same time. Even now, there are significant differences between the outputs due to the differences in syntax (headings, images, command line option lists). Anyway, the reStructuredText is scheduled for removal since the initial addition of the Markdown build, so a separate file will be easy to remove later (and this is basically a first step in the removal).
Hm, just fixing missing void in fun prototype and only macOS build reported
|
It's the only one running clang, and they find different things. We had Travis, but it was an older clang version anyways. |
/*! | ||
\brief Print module usage description in reStructuredText format. | ||
*/ | ||
void G__usage_rest(void) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are the names inconsistent now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API is the same in both cases G__usage_rest and G__usage_markdown. The only difference is that G__usage_markdown calls static usage_md while G__usage_rest provides the implementation directly. I just kept code structure which is also common elsewhere, but it is not needed here now. I can clean that up so that there is no jump from the API function to static function and there is only one function. That will raise less questions.
This restores the original 'rest' file for reStructuredText output so that it is in a separate function (and file) from Markdown. The reStructuredText output is removed from the Markdown code. While this currently introduces some duplication, it allows for further modifications of Markdown without a need to modify the reStructuredText at the same time. Even now, there are significant differences between the outputs due to the differences in syntax (headings, images, command line option lists). Anyway, the reStructuredText is scheduled for removal since the initial addition of the Markdown build, so a separate file will be easy to remove later (and this is basically a first step in the removal).