git.iko.soy/typeable/pandoc
on master help sign in
pandoc: Add newline to output unless standalone.
93c3e27John MacFarlane
src/pandoc.hs+6−2
@@ -813,6 +813,10 @@ main = do
813
813
814 writerOutput <- writer writerOptions doc''
814 writerOutput <- writer writerOptions doc''
815
815
816+ let writerOutput' = if standalone
817+ then writerOutput
818+ else writerOutput `B.snoc` 10
819+
816 if outputFile == "-"
820 if outputFile == "-"
817− then B.putStr writerOutput
821+ then B.putStr writerOutput'
818− else B.writeFile (encodeString outputFile) writerOutput
822+ else B.writeFile (encodeString outputFile) writerOutput'
tests/markdown-citations.chicago-author-date.txt+1−1
@@ -40,4 +40,4 @@ Doe, John, and Jenny Roe. 2007. Why Water Is Wet. In *Third Book*, ed. Sam Smith
40
40
41[^2]: Some citations (see Doe 2006, chap. 3; Doe and Roe 2007; Doe 2005).
41[^2]: Some citations (see Doe 2006, chap. 3; Doe and Roe 2007; Doe 2005).
42
42
43−[^3]: Like a citation without author: (2005), and now Doe with a locator (2006, 44).
43+[^3]: Like a citation without author: (2005), and now Doe with a locator (2006, 44).
tests/markdown-citations.ieee.txt+1−1
@@ -40,4 +40,4 @@
40
40
41[^2]: Some citations [1]-[3].
41[^2]: Some citations [1]-[3].
42
42
43−[^3]: Like a citation without author: [1], and now Doe with a locator [2].
43+[^3]: Like a citation without author: [1], and now Doe with a locator [2].
tests/markdown-citations.txt+1−1
@@ -34,4 +34,4 @@
34
34
35[^2]: Some citations [see @item2 chap. 3; @item3; @item1].
35[^2]: Some citations [see @item2 chap. 3; @item3; @item1].
36
36
37−[^3]: Like a citation without author: [-@item1], and now Doe with a locator [-@item2 p. 44].
37+[^3]: Like a citation without author: [-@item1], and now Doe with a locator [-@item2 p. 44].
tests/markdown-reader-more.native+1
@@ -49,3 +49,4 @@ Pandoc (Meta {docTitle = [Str "Title",Space,Str "spanning",Space,Str "multiple",
49, Header 2 [Str "Curly",Space,Str "smart",Space,Str "quotes"]
49, Header 2 [Str "Curly",Space,Str "smart",Space,Str "quotes"]
50, Para [Quoted DoubleQuote [Str "Hi"]]
50, Para [Quoted DoubleQuote [Str "Hi"]]
51, Para [Quoted SingleQuote [Str "Hi"]] ]
51, Para [Quoted SingleQuote [Str "Hi"]] ]
52+
tests/s5.fragment.html+1−1
@@ -14,4 +14,4 @@
14 >$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span
14 >$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span
15 ></li
15 ></li
16 ></ul
16 ></ul
17−>
17+>
tests/tables-rstsubset.native+1
@@ -116,3 +116,4 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
116 , [ Plain [Str "row"] ]
116 , [ Plain [Str "row"] ]
117 , [ Plain [Str "5",Str ".",Str "0"] ]
117 , [ Plain [Str "5",Str ".",Str "0"] ]
118 , [ Plain [Str "Here",Str "'",Str "s",Space,Str "another",Space,Str "one",Str ".",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows",Str "."] ] ] ] ]
118 , [ Plain [Str "Here",Str "'",Str "s",Space,Str "another",Space,Str "one",Str ".",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows",Str "."] ] ] ] ]
119+
tests/tables.context+1−1
@@ -172,4 +172,4 @@ Multiline table without column headers:
172\NC Here's another one. Note the blank line between rows.
172\NC Here's another one. Note the blank line between rows.
173\NC\AR
173\NC\AR
174\HL
174\HL
175−\stoptable
175+\stoptable
tests/tables.docbook+1−1
@@ -399,4 +399,4 @@
399 </td>
399 </td>
400 </tr>
400 </tr>
401 </tbody>
401 </tbody>
402−</informaltable>
402+</informaltable>
tests/tables.html+1−1
@@ -298,4 +298,4 @@
298 ></tr
298 ></tr
299 ></tbody
299 ></tbody
300 ></table
300 ></table
301−>
301+>
tests/tables.latex+1
@@ -175,3 +175,4 @@ Second
175\\
175\\
176\end{tabular}
176\end{tabular}
177\end{center}
177\end{center}
178+
tests/tables.man+1−1
@@ -264,4 +264,4 @@ T}@T{
264Here\[aq]s another one.
264Here\[aq]s another one.
265Note the blank line between rows.
265Note the blank line between rows.
266T}
266T}
267−.TE
267+.TE
tests/tables.markdown+1
@@ -75,3 +75,4 @@ Multiline table without column headers:
75 rows.
75 rows.
76 ----------- ---------- ------------ --------------------------
76 ----------- ---------- ------------ --------------------------
77
77
78+
tests/tables.mediawiki+1
@@ -209,3 +209,4 @@ Multiline table without column headers:
209</tr>
209</tr>
210</tbody>
210</tbody>
211</table>
211</table>
212+
tests/tables.native+1
@@ -113,3 +113,4 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
113 , [ Plain [Str "row"] ]
113 , [ Plain [Str "row"] ]
114 , [ Plain [Str "5",Str ".",Str "0"] ]
114 , [ Plain [Str "5",Str ".",Str "0"] ]
115 , [ Plain [Str "Here",Str "'",Str "s",Space,Str "another",Space,Str "one",Str ".",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows",Str "."] ] ] ] ]
115 , [ Plain [Str "Here",Str "'",Str "s",Space,Str "another",Space,Str "one",Str ".",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows",Str "."] ] ] ] ]
116+
tests/tables.opendocument+1−1
@@ -393,4 +393,4 @@ headers:</text:p>
393 blank line between rows.</text:p>
393 blank line between rows.</text:p>
394 </table:table-cell>
394 </table:table-cell>
395 </table:table-row>
395 </table:table-row>
396−</table:table>
396+</table:table>
tests/tables.org+1
@@ -49,3 +49,4 @@ Multiline table without column headers:
49
49
50| First | row | 12.0 | Example of a row that spans multiple lines. |
50| First | row | 12.0 | Example of a row that spans multiple lines. |
51| Second | row | 5.0 | Here's another one. Note the blank line between rows. |
51| Second | row | 5.0 | Here's another one. Note the blank line between rows. |
52+
tests/tables.plain+1
@@ -75,3 +75,4 @@ Multiline table without column headers:
75 rows.
75 rows.
76 ----------- ---------- ------------ --------------------------
76 ----------- ---------- ------------ --------------------------
77
77
78+
tests/tables.rst+1
@@ -88,3 +88,4 @@ Multiline table without column headers:
88| | | | the blank line between |
88| | | | the blank line between |
89| | | | rows. |
89| | | | rows. |
90+-------------+------------+--------------+----------------------------+
90+-------------+------------+--------------+----------------------------+
91+
tests/tables.rtf+1
@@ -357,3 +357,4 @@
357}
357}
358\intbl\row}
358\intbl\row}
359{\pard \ql \f0 \sa180 \li0 \fi0 \par}
359{\pard \ql \f0 \sa180 \li0 \fi0 \par}
360+
tests/tables.texinfo+1−1
@@ -155,4 +155,4 @@ Second
155 @tab row
155 @tab row
156 @tab 5.0
156 @tab 5.0
157 @tab Here's another one. Note the blank line between rows.
157 @tab Here's another one. Note the blank line between rows.
158−@end multitable
158+@end multitable
tests/tables.textile+1
@@ -209,3 +209,4 @@ Multiline table without column headers:
209</tr>
209</tr>
210 </tbody>
210 </tbody>
211 </table>
211 </table>
212+