gjtorikian / html-pipeline

HTML processing filters and utilities
MIT License
2.27k stars 380 forks source link

console rendering of slash continued multi-line commands #328

Closed peterjc closed 4 years ago

peterjc commented 4 years ago

GitHub's rending of reStructuredText marked up with the "console" language code snippets is broken.

(Apologies if this is the wrong place to report this - please redirect me if needed)

Bash and other terminals support ending a line with slash (\) and an immediate new line (\n) to indicated the command line continues. This convention is commonly used in documentation as a way to add explicit line breaks to split long commands visually on a restricted screen on page width.

The continued command on the second lines onwards should be formatted like the first line of the command (black) and not as part of the potential command output (blue), e.g.

https://github.com/peterjc/thapbi-pict/blob/v0.6.4/docs/worked_example/sample_summary.rst

Cross reference https://github.com/pygments/pygments/issues/1368 (pygments works as long as the lines end slash new line with no trailing space), but having done more reading I'm not sure that GitHub or html-pipeline are using pygments by default any more?

gjtorikian commented 4 years ago

Please log issues with how GitHub renders markup with their support team: https://support.github.com/

peterjc commented 4 years ago

Done, thank you.