Pygments (HtmlFormatter?) strips leading and trailing empty lines #2675
Answered
by
jeanas
vanschelven
asked this question in
Q&A
-
When the input code contains leading and trailing empty lines, these are stripped. I would like to preserve them, but AFAICT I cannot instruct "Empty lines are lines too"; one obvious reason empty lines are important is to keep line numbers correct.
Similar issue which is reportedly fixed: #818 |
Beta Was this translation helpful? Give feedback.
Answered by
jeanas
Mar 29, 2024
Replies: 1 comment
-
You should pass |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
vanschelven
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should pass
stripnl=False
toPythonLexer()
as documented here.