markdown-preview-enhanced
markdown-preview-enhanced copied to clipboard
Can't get line wrapping to work correctly with line numbers enabled
My markdown file
# Title
Some text here
## Topic 1
@import "./file.yang" {code_block=true class="line-numbers"}
The file.yang has one very long line that soft wraps in the editor perfectly, but does not in the preview. I added the line be;low to my local-style.less file. The long like does not wrap in the preview, but when I create a Chrome (Puppeteer) -> PDF, the line wraps. The numbers continue in sequence through the wrapped lines until they run out at the end and leave four or so lines without line numbers. I would have expected the line numbers to skip the line wraps. Does anyone have a work around for this issue? I can turn off the line number to fix the numbering, but can't tell form the pdf output which lines have been wrapped.
.markdown-preview.markdown-preview {
@media print {
// lines here not shown
pre, code {white-space: pre-wrap;}
// lines here not shown
}
Having a similar problem:
in style.less
:
pre, code {
white-space: pre-wrap;
}
preview:
rendered pdf with puppeteer:
it would be really nice if the newlines were recognized by the line numbers.