Skip to content

on_page_markdown does not include snippet content #2074

Answered by facelessuser
vermiculus asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not exactly sure what the complaint is here. Per the MkDocs documentation it states:

The page_markdown event is called after the page's markdown is loaded from file and can be used to alter the Markdown source text. The meta-data has been stripped off and is available as page.meta at this point.

So, it loads the Markdown source, which contains --8<-- and allows you to alter it. What is happening is that the the on_page_markdown event in MkDocs let's you alter the Markdown source before the Python Markdown parser processes the content, and the Snippets extension is a Python Markdown extension, not a MkDocs plugin. Hopefully that makes sense.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@facelessuser
Comment options

@facelessuser
Comment options

@vermiculus
Comment options

@facelessuser
Comment options

@vermiculus
Comment options

Answer selected by facelessuser
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
T: bug Bug. S: triage Issue needs triage.
2 participants
Converted from issue

This discussion was converted from issue #2071 on June 13, 2023 13:16.