git.iko.soy/typeable/pandoc
on master help sign in
Force word wrapping in code tags

For instance, if you try to compile the following markdown code with pandoc (using 1.12): ``` markdown Page 1 ------ This is a very long code line that will appear on every slide even on page three Page 2 ------ My content Page 3 ------ My last content ``` using this command: pandoc -s -t dzslides test.md -o /tmp/test.html the long code line will appear on every slide. Using pre-wrap fixes the problem by forcing word wrap of code. The only drawback is that it requires IE 8 [according to MDN](https://developer.mozilla.org/fr/docs/Web/CSS/white-space), which make it less compatible. A workaround it to wrap the code when writing it, but if you consider inline code tags using the accents \`\` in markdown this is not possible.

commitbd5818c52a0fd5f77dceab04f9a208b4100ab2f4 authorNicolas Porcel <nicolasporcel06@gmail.com> dateThu 24 Nov 2016, 15:32 (10 years ago) parent8a05c8e
1 file changed+1−1
default.dzslides+1−1
default.dzslides+1−1
@@ -12,7 +12,7 @@ $if(keywords)$
1212 <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$">
1313$endif$
1414 <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
15− <style type="text/css">code{white-space: pre;}</style>
15+ <style type="text/css">code{white-space: pre-wrap;}</style>
1616$if(quotes)$
1717 <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
1818$endif$