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

Reorganized SphinxBuilder for markdown parsing #25

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aprotyas
Copy link
Contributor

  • Removed a stray TODO comment from an experimental idea for Improve package landing page #22.
  • Moved the lexerMapping changes to exhale arguments into the
    conditional support_markdown block, so that the appropriate Pygments
    lexer is only registered if support for markdown was enabled.
  • Added longer description of the support_markdown option.

Signed-off-by: Abrar Rahman Protyasha [email protected]

extensions.append('myst_parser')
# If markdown support is enabled, the appropriate Pygments lexer must
# be registered for `.md`/`.markdown` file suffixes
exhale_args.update({{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work if exhale_args is False but support_markdown is True?

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 6281b49.

An alternative to that patch would be to invoke ensure_global on exhale_args, but that may create a needless copy of exhale_args incase enable_exhale is false.

Abrar Rahman Protyasha added 2 commits August 5, 2021 12:40
* Removed a stray TODO comment from an experimental idea for ros-infrastructure#22.
* Moved the `lexerMapping` changes to `exhale` arguments into the
  conditional `support_markdown` block, so that the appropriate Pygments
  lexer is only registered if support for markdown was enabled.
* Added longer description of the `support_markdown` option.

Signed-off-by: Abrar Rahman Protyasha <[email protected]>
The `exhale_args` mapping should only be updated with the appropriate
Pygments markdown lexer if both markdown support and exhale support are
requested. As such, an additional check for `enable_exhale` is added
into the markdown support configuration block.

An alternative would be to invoke `ensure_global` on `exhale_args`, but
that may create a needless copy of `exhale_args` incase `enable_exhale`
is false.

Signed-off-by: Abrar Rahman Protyasha <[email protected]>
@aprotyas aprotyas force-pushed the aprotyas/organize-markdown-parsing branch from bc727fd to 6281b49 Compare August 5, 2021 16:49
@aprotyas
Copy link
Contributor Author

aprotyas commented Aug 9, 2021

Pinging @clalancette for a re-review following 6281b49, where exhale_args is now only updated if enable_exhale was set to true.

@nuclearsandwich nuclearsandwich self-requested a review July 12, 2024 15:57
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