MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.45k stars 1.09k forks source link

Splitting code blocks across pages in PDF #1142

Open whichxjy opened 4 years ago

whichxjy commented 4 years ago

Hello,

I'm trying to generate pdf from a markdown file with a code block. This code block is about one page long and would not fit in the current page, thus the code block starts on a new page, leaving the first one half empty. Is that possible to split code blocks like this across pages?

Markdown

1

PDF

2

Setting

3
legoming commented 4 years ago

try sth like

@media print {
        code, pre, tt, pre code, pre[class*="language-"], code[class*="language-"] {
                white-space:break-spaces !important;
    }