git.iko.soy/typeable/pandoc
on master help sign in
Haddock writer: Use _____ for hrule.

Avoids interpretation as list.

commit00281559bf9c955ece6b18d48ef487fdc5f4406e authorJohn MacFarlane <jgm@berkeley.edu> dateThu 19 Jun 2014, 00:28 (12 years ago) parent95b6ffc
2 files changed+15−15
src/Text/Pandoc/Writers/Haddock.hs+2−2 tests/writer.haddock+13−13
src/Text/Pandoc/Writers/Haddock.hs+2−2
@@ -112,8 +112,8 @@ blockToHaddock _ (RawBlock f str)
112112 | f == "haddock" = do
113113 return $ text str <> text "\n"
114114 | otherwise = return empty
115−blockToHaddock _ HorizontalRule =
116− return $ blankline <> text "--------------" <> blankline
115+blockToHaddock opts HorizontalRule =
116+ return $ blankline <> text (replicate (writerColumns opts) '_') <> blankline
117117blockToHaddock opts (Header level (ident,_,_) inlines) = do
118118 contents <- inlineListToHaddock opts inlines
119119 let attr' = if null ident
tests/writer.haddock+13−13
@@ -1,7 +1,7 @@
11This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
22markdown test suite.
33
4−--------------
4+______________________________________________________________________________
55
66= Headers
77#headers#
@@ -34,7 +34,7 @@ with no blank line
3434
3535with no blank line
3636
37−--------------
37+______________________________________________________________________________
3838
3939= Paragraphs
4040#paragraphs#
@@ -50,7 +50,7 @@ Here’s one with a bullet. * criminey.
5050There should be a hard line break
5151here.
5252
53−--------------
53+______________________________________________________________________________
5454
5555= Block Quotes
5656#block-quotes#
@@ -80,7 +80,7 @@ This should not be a block quote: 2 > 1.
8080
8181And a following paragraph.
8282
83−--------------
83+______________________________________________________________________________
8484
8585= Code Blocks
8686#code-blocks#
@@ -101,7 +101,7 @@ And:
101101>
102102> These should not be escaped: \$ \\ \> \[ \{
103103
104−--------------
104+______________________________________________________________________________
105105
106106= Lists
107107#lists#
@@ -264,7 +264,7 @@ M.A. 2007
264264
265265B. Williams
266266
267−--------------
267+______________________________________________________________________________
268268
269269= Definition Lists
270270#definition-lists#
@@ -397,7 +397,7 @@ Code:
397397
398398Hr’s:
399399
400−--------------
400+______________________________________________________________________________
401401
402402= Inline Markup
403403#inline-markup#
@@ -427,7 +427,7 @@ Subscripts: H2O, H23O, Hmany of themO.
427427These should not be superscripts or subscripts, because of the unescaped
428428spaces: a^b c^d, a~b c~d.
429429
430−--------------
430+______________________________________________________________________________
431431
432432= Smart quotes, ellipses, dashes
433433#smart-quotes-ellipses-dashes#
@@ -449,7 +449,7 @@ Dashes between numbers: 5–7, 255–66, 1987–1999.
449449
450450Ellipses…and…and….
451451
452−--------------
452+______________________________________________________________________________
453453
454454= LaTeX
455455#latex#
@@ -474,7 +474,7 @@ These shouldn’t be math:
474474
475475Here’s a LaTeX table:
476476
477−--------------
477+______________________________________________________________________________
478478
479479= Special Characters
480480#special-characters#
@@ -529,7 +529,7 @@ Plus: +
529529
530530Minus: -
531531
532−--------------
532+______________________________________________________________________________
533533
534534= Links
535535#links#
@@ -610,7 +610,7 @@ Auto-links should not occur here: @\<http:\/\/example.com\/>@
610610
611611> or here: <http://example.com/>
612612
613−--------------
613+______________________________________________________________________________
614614
615615= Images
616616#images#
@@ -621,7 +621,7 @@ From “Voyage dans la Lune” by Georges Melies (1902):
621621
622622Here is a movie <<movie.jpg movie>> icon.
623623
624−--------------
624+______________________________________________________________________________
625625
626626= Footnotes
627627#footnotes#