diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-12-05 17:10:33 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-12-05 17:10:33 -0800 |
commit | d5e68d43beb176733b77b5afe38f6453902dcf4b (patch) | |
tree | ddb46d41ef4612b65bf4ab4a2005a5ef7101f9ff | |
parent | 38200c0291907fe0e5216b487677c64c90151d0a (diff) | |
download | pandoc-d5e68d43beb176733b77b5afe38f6453902dcf4b.tar.gz |
RST writer: don't wrap simple table header lines.
Closes #5128.
-rw-r--r-- | src/Text/Pandoc/Writers/RST.hs | 2 | ||||
-rw-r--r-- | test/command/5128.md | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index ea7c04e9b..f27e06fce 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -718,7 +718,7 @@ simpleTable opts blocksToDoc headers rows = do numChars xs = maximum . map offset $ xs let colWidths = map numChars $ transpose (headerDocs : rowDocs) let toRow = hsep . zipWith lblock colWidths - let hline = hsep (map (\n -> text (replicate n '=')) colWidths) + let hline = nowrap $ hsep (map (\n -> text (replicate n '=')) colWidths) let hdr = if all null headers then mempty else hline $$ toRow headerDocs diff --git a/test/command/5128.md b/test/command/5128.md new file mode 100644 index 000000000..2ab051c04 --- /dev/null +++ b/test/command/5128.md @@ -0,0 +1,18 @@ +``` +pandoc -f org -t rst +| Option | Meaning | +|--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| =<= | Left alignment, additional characters are added to the right (default for string). | +| =>= | Right alignment, additional characters are added to the left. | +| =^= | Centered , the same amount of characters is added to the left and the right. | +| === | Padding. If a numeric value is printed with a sign, then additional characters are added after the sign. Otherwise it behaves like "=>=". This option is only available for numbers (default for numbers). | +^D +====== ============================================================================================================================================================================================================ +Option Meaning +====== ============================================================================================================================================================================================================ +``<`` Left alignment, additional characters are added to the right (default for string). +``>`` Right alignment, additional characters are added to the left. +``^`` Centered , the same amount of characters is added to the left and the right. +``=`` Padding. If a numeric value is printed with a sign, then additional characters are added after the sign. Otherwise it behaves like "``>``". This option is only available for numbers (default for numbers). +====== ============================================================================================================================================================================================================ +``` |