Don't eat "pathless shebang lines" that could be actual Rust code · Issue #1156 · Python-Markdown/markdown (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
Howdy! The following syntax has surprising results with Python-Markdown, because the markdown processor tries to hide the "shebang line without path":
The feature causing this problem is https://python-markdown.github.io/extensions/code_hilite/#shebang-no-path, which attempts to create an empty code block. I think that structurally you should be able to represent anything you like inside a code block, including syntax that could be a pathless shebang line, and thus the correct solution is to either remove the "shebang-no-path" feature, or at least make it optional (probably default-off), which makes the above string not appear properly in code blocks.
See https://johnmacfarlane.net/babelmark2/?text=%60%60%60%0A%23!test%0A%60%60%60%0A for what other implementations do, and zulip/zulip#18591 for an example user experience with this feature (the original reproducer was actual Rust code).