git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'timtylin-patch/fixTexinfoWrap'
commit20b3dea3fe6f531cdec2f2fe6f7552912cb99feb authorJohn MacFarlane <jgm@berkeley.edu> dateSat 7 Feb 2015, 20:31 (12 years ago) parent0a1cd25bd7cf8d
2 files changed+32−13
src/Text/Pandoc/Writers/Texinfo.hs+1−1 tests/writer.texinfo+31−12
src/Text/Pandoc/Writers/Texinfo.hs+1−1
@@ -422,7 +422,7 @@ inlineToTexinfo (RawInline f str)
422422 | f == "texinfo" = return $ text str
423423 | otherwise = return empty
424424inlineToTexinfo (LineBreak) = return $ text "@*" <> cr
425−inlineToTexinfo Space = return $ char ' '
425+inlineToTexinfo Space = return space
426426
427427inlineToTexinfo (Link txt (src@('#':_), _)) = do
428428 contents <- escapeCommas $ inlineListToTexinfo txt
tests/writer.texinfo+31−12
@@ -36,7 +36,8 @@ July 17, 2006
3636@node Top
3737@top Pandoc Test Suite
3838
39−This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite.
39+This is a set of tests for pandoc. Most of them are adapted from John Gruber's
40+markdown test suite.
4041
4142@iftex
4243@bigskip@hrule@bigskip
@@ -125,7 +126,9 @@ with no blank line
125126@anchor{#paragraphs}
126127Here's a regular paragraph.
127128
128−In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.
129+In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
130+Because a hard-wrapped line in the middle of a paragraph looked like a list
131+item.
129132
130133Here's one with a bullet. * criminey.
131134
@@ -735,11 +738,14 @@ This is code: @code{>}, @code{$}, @code{\}, @code{\$}, @code{<html>}.
735738
736739@textstrikeout{This is @emph{strikeout}.}
737740
738−Superscripts: a@textsuperscript{bc}d a@textsuperscript{@emph{hello}} a@textsuperscript{hello@ there}.
741+Superscripts: a@textsuperscript{bc}d a@textsuperscript{@emph{hello}}
742+a@textsuperscript{hello@ there}.
739743
740−Subscripts: H@textsubscript{2}O, H@textsubscript{23}O, H@textsubscript{many@ of@ them}O.
744+Subscripts: H@textsubscript{2}O, H@textsubscript{23}O,
745+H@textsubscript{many@ of@ them}O.
741746
742−These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.
747+These should not be superscripts or subscripts, because of the unescaped
748+spaces: a^b c^d, a~b c~d.
743749
744750@iftex
745751@bigskip@hrule@bigskip
@@ -759,7 +765,8 @@ These should not be superscripts or subscripts, because of the unescaped spaces:
759765
760766`He said, ``I want to go.''' Were you alive in the 70's?
761767
762−Here is some quoted `@code{code}' and a ``@uref{http://example.com/?foo=1&bar=2,quoted link}''.
768+Here is some quoted `@code{code}' and a
769+``@uref{http://example.com/?foo=1&bar=2,quoted link}''.
763770
764771Some dashes: one---two --- three---four --- five.
765772
@@ -793,7 +800,8 @@ Ellipses@dots{}and@dots{}and@dots{}.
793800@item
794801@math{p}-Tree
795802@item
796−Here's some display math: @math{\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}}
803+Here's some display math:
804+@math{\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}}
797805@item
798806Here's one that has a line break in it: @math{\alpha + \omega \times x^2}.
799807@end itemize
@@ -804,7 +812,8 @@ These shouldn't be math:
804812@item
805813To get the famous equation, write @code{$e = mc^2$}.
806814@item
807−$22,000 is a @emph{lot} of money. So is $34,000. (It worked if ``lot'' is emphasized.)
815+$22,000 is a @emph{lot} of money. So is $34,000. (It worked if ``lot'' is
816+emphasized.)
808817@item
809818Shoes ($20) and socks ($5).
810819@item
@@ -957,7 +966,8 @@ Foo @uref{/url/,biz}.
957966@node With ampersands
958967@section With ampersands
959968@anchor{#with-ampersands}
960−Here's a @uref{http://example.com/?foo=1&bar=2,link with an ampersand in the URL}.
969+Here's a @uref{http://example.com/?foo=1&bar=2,link with an ampersand in the
970+URL}.
961971
962972Here's a link with an amersand in the link text: @uref{http://att.com/,AT&T}.
963973
@@ -1019,15 +1029,24 @@ Here is a movie @image{movie,,,movie,jpg} icon.
10191029@node Footnotes
10201030@chapter Footnotes
10211031@anchor{#footnotes}
1022−Here is a footnote reference,@footnote{Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.} and another.@footnote{Here's the long note. This one contains multiple blocks.
1032+Here is a footnote reference,@footnote{Here is the footnote. It can go
1033+anywhere after the footnote reference. It need not be placed at the end of the
1034+document.} and another.@footnote{Here's the long note. This one contains
1035+multiple blocks.
10231036
1024−Subsequent blocks are indented to show that they belong to the footnote (as with list items).
1037+Subsequent blocks are indented to show that they belong to the footnote (as
1038+with list items).
10251039
10261040@verbatim
10271041 { <code> }
10281042@end verbatim
10291043
1030−If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.} This should @emph{not} be a footnote reference, because it contains a space.[^my note] Here is an inline note.@footnote{This is @emph{easier} to type. Inline notes may contain @uref{http://google.com,links} and @code{]} verbatim characters, as well as [bracketed text].}
1044+If you want, you can indent every line, but you can also be lazy and just
1045+indent the first line of each block.} This should @emph{not} be a footnote
1046+reference, because it contains a space.[^my note] Here is an inline
1047+note.@footnote{This is @emph{easier} to type. Inline notes may contain
1048+@uref{http://google.com,links} and @code{]} verbatim characters, as well as
1049+[bracketed text].}
10311050
10321051@quotation
10331052Notes can go in quotes.@footnote{In quote.}