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

Admonitions in included markdown pages are not rendered #665

Closed
amorison opened this issue Nov 8, 2024 · 3 comments
Closed

Admonitions in included markdown pages are not rendered #665

amorison opened this issue Nov 8, 2024 · 3 comments

Comments

@amorison
Copy link
Contributor

amorison commented Nov 8, 2024

When including another markdown document using the markdown_include extension, admonitions (@note, @warning, etc) are not rendered in the produced document but simply left as is.

For example, with the following README.md

My project
=========

Description of what it does.

@note
Important thing to keep in mind.
@endnote

and with the following inclusion in the documentation itself

{!path/to/README.md!}

the note is not rendered.

I am not sure whether this is a bug with the admonition extension as implemented in Ford or something else. Other extensions (such as math expression rendering) seem to work, so this puzzles me.

@d7919
Copy link
Contributor

d7919 commented Nov 11, 2024

I think this is due to the priority number associated with the markdown_include and FORD specific Admonition extensions. The former uses a priority of 101 whilst the latter has 105. As larger priority number extensions are run before lower priority ones, this means we don't include files until after we've parsed for admonitions. Dropping admonition to 101 (equal to markdown_include) seems to fix the issue for a local project which showed the same issue.

d7919 added a commit to d7919/ford that referenced this issue Nov 11, 2024
Drops the priority of the admonition to <= markdown_include to ensure included files get admonition's rendered correctly
@amorison
Copy link
Contributor Author

I confirm that your fix works for me too, thanks!

ZedThree added a commit that referenced this issue Nov 12, 2024
Update md_admonition.py to fix issue #665
@ZedThree
Copy link
Member

Fixed in #666

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

No branches or pull requests

3 participants