git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'patch/fixTexinfoWrap' of https://github.com/timtylin/scholdoc into timtylin-patch/fixTexinfoWrap
bd7cf8dJohn MacFarlane
src/Text/Pandoc/Writers/Texinfo.hs+1−1
@@ -422,7 +422,7 @@ inlineToTexinfo (RawInline f str)
422 | f == "texinfo" = return $ text str
422 | f == "texinfo" = return $ text str
423 | otherwise = return empty
423 | otherwise = return empty
424inlineToTexinfo (LineBreak) = return $ text "@*" <> cr
424inlineToTexinfo (LineBreak) = return $ text "@*" <> cr
425−inlineToTexinfo Space = return $ char ' '
425+inlineToTexinfo Space = return space
426
426
427inlineToTexinfo (Link txt (src@('#':_), _)) = do
427inlineToTexinfo (Link txt (src@('#':_), _)) = do
428 contents <- escapeCommas $ inlineListToTexinfo txt
428 contents <- escapeCommas $ inlineListToTexinfo txt
tests/writer.texinfo+31−12
@@ -36,7 +36,8 @@ July 17, 2006
36@node Top
36@node Top
37@top Pandoc Test Suite
37@top Pandoc Test Suite
38
38
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.
40
41
41@iftex
42@iftex
42@bigskip@hrule@bigskip
43@bigskip@hrule@bigskip
@@ -125,7 +126,9 @@ with no blank line
125@anchor{#paragraphs}
126@anchor{#paragraphs}
126Here's a regular paragraph.
127Here's a regular paragraph.
127
128
129+In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
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.
130+Because a hard-wrapped line in the middle of a paragraph looked like a list
131+item.
129
132
130Here's one with a bullet. * criminey.
133Here's one with a bullet. * criminey.
131
134
@@ -735,11 +738,14 @@ This is code: @code{>}, @code{$}, @code{\}, @code{\$}, @code{<html>}.
735
738
736@textstrikeout{This is @emph{strikeout}.}
739@textstrikeout{This is @emph{strikeout}.}
737
740
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}.
739
743
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.
741
746
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.
743
749
744@iftex
750@iftex
745@bigskip@hrule@bigskip
751@bigskip@hrule@bigskip
@@ -759,7 +765,8 @@ These should not be superscripts or subscripts, because of the unescaped spaces:
759
765
760`He said, ``I want to go.''' Were you alive in the 70's?
766`He said, ``I want to go.''' Were you alive in the 70's?
761
767
768+Here is some quoted `@code{code}' and a
762−Here is some quoted `@code{code}' and a ``@uref{http://example.com/?foo=1&bar=2,quoted link}''.
769+``@uref{http://example.com/?foo=1&bar=2,quoted link}''.
763
770
764Some dashes: one---two --- three---four --- five.
771Some dashes: one---two --- three---four --- five.
765
772
@@ -793,7 +800,8 @@ Ellipses@dots{}and@dots{}and@dots{}.
793@item
800@item
794@math{p}-Tree
801@math{p}-Tree
795@item
802@item
803+Here's some display math:
796−Here's some display math: @math{\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}}
804+@math{\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}}
797@item
805@item
798Here's one that has a line break in it: @math{\alpha + \omega \times x^2}.
806Here's one that has a line break in it: @math{\alpha + \omega \times x^2}.
799@end itemize
807@end itemize
@@ -804,7 +812,8 @@ These shouldn't be math:
804@item
812@item
805To get the famous equation, write @code{$e = mc^2$}.
813To get the famous equation, write @code{$e = mc^2$}.
806@item
814@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.)
808@item
817@item
809Shoes ($20) and socks ($5).
818Shoes ($20) and socks ($5).
810@item
819@item
@@ -957,7 +966,8 @@ Foo @uref{/url/,biz}.
957@node With ampersands
966@node With ampersands
958@section With ampersands
967@section With ampersands
959@anchor{#with-ampersands}
968@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}.
961
971
962Here's a link with an amersand in the link text: @uref{http://att.com/,AT&T}.
972Here's a link with an amersand in the link text: @uref{http://att.com/,AT&T}.
963
973
@@ -1019,15 +1029,24 @@ Here is a movie @image{movie,,,movie,jpg} icon.
1019@node Footnotes
1029@node Footnotes
1020@chapter Footnotes
1030@chapter Footnotes
1021@anchor{#footnotes}
1031@anchor{#footnotes}
1032+Here is a footnote reference,@footnote{Here is the footnote. It can go
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.
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.
1023
1036
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).
1025
1039
1026@verbatim
1040@verbatim
1027 { <code> }
1041 { <code> }
1028@end verbatim
1042@end verbatim
1029
1043
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].}
1031
1050
1032@quotation
1051@quotation
1033Notes can go in quotes.@footnote{In quote.}
1052Notes can go in quotes.@footnote{In quote.}