KyleKing/mdformat-mkdocs

Snippets block is incorrectly escaped

pelson opened this issue · 3 comments

Given the use of snippets (https://facelessuser.github.io/pymdown-extensions/extensions/snippets/), the documented markup (--8<-- "filename.ext") is escaped, such that it becomes --8\<-- "filename.ext") and the resulting page is the escaped literal, instead of the included snippet.

Tested with the latest version of mdformat-mkdocs

Would it be helpful if I try to fix this? I'll be honest and say that I'm not clear at all where such a fix would go (there is no obvious escaping section in the codebase)...

Thanks, if you have time, I would be open to contributions!

My plan was to add an inline parser that recognizes pymdown snippets. The closest recent example I have is here: KyleKing/mdformat-obsidian@135790a#diff-f658f5a83906fbf2444fbf383869444a5a44f642b0ceb2022bdfa66e9c895274 (before I realized there was an mdit-py-plugin)