diff options
author | Nicolas Porcel <nicolasporcel06@gmail.com> | 2016-11-24 15:32:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-24 15:32:24 +0100 |
commit | bd5818c52a0fd5f77dceab04f9a208b4100ab2f4 (patch) | |
tree | c925574f9ddab8dd0a644ca3df8a52cbfe0351fd | |
parent | 8a05c8e70a77c3c50005a3b706d62e9239603180 (diff) | |
download | pandoc-bd5818c52a0fd5f77dceab04f9a208b4100ab2f4.tar.gz |
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.
-rw-r--r-- | default.dzslides | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/default.dzslides b/default.dzslides index c8c249030..97d518931 100644 --- a/default.dzslides +++ b/default.dzslides @@ -12,7 +12,7 @@ $if(keywords)$ <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$"> $endif$ <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title> - <style type="text/css">code{white-space: pre;}</style> + <style type="text/css">code{white-space: pre-wrap;}</style> $if(quotes)$ <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style> $endif$ |