git.iko.soy/typeable/pandoc
on master help sign in
RST writer: don't wrap simple table header lines.

Closes #5128.

commitd5e68d43beb176733b77b5afe38f6453902dcf4b authorJohn MacFarlane <jgm@berkeley.edu> dateWed 5 Dec 2018, 17:10 (8 years ago) parent38200c0
2 files changed+19−1
src/Text/Pandoc/Writers/RST.hs+1−1 test/command/5128.md+18
src/Text/Pandoc/Writers/RST.hs+1−1
@@ -718,7 +718,7 @@ simpleTable opts blocksToDoc headers rows = do
718718 numChars xs = maximum . map offset $ xs
719719 let colWidths = map numChars $ transpose (headerDocs : rowDocs)
720720 let toRow = hsep . zipWith lblock colWidths
721− let hline = hsep (map (\n -> text (replicate n '=')) colWidths)
721+ let hline = nowrap $ hsep (map (\n -> text (replicate n '=')) colWidths)
722722 let hdr = if all null headers
723723 then mempty
724724 else hline $$ toRow headerDocs
test/command/5128.mdnew file+18
@@ -0,0 +1,18 @@
1+```
2+pandoc -f org -t rst
3+| Option | Meaning |
4+|--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
5+| =<= | Left alignment, additional characters are added to the right (default for string). |
6+| =>= | Right alignment, additional characters are added to the left. |
7+| =^= | Centered , the same amount of characters is added to the left and the right. |
8+| === | 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). |
9+^D
10+====== ============================================================================================================================================================================================================
11+Option Meaning
12+====== ============================================================================================================================================================================================================
13+``<`` Left alignment, additional characters are added to the right (default for string).
14+``>`` Right alignment, additional characters are added to the left.
15+``^`` Centered , the same amount of characters is added to the left and the right.
16+``=`` 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).
17+====== ============================================================================================================================================================================================================
18+```