git.iko.soy/typeable/pandoc
on master help sign in
Docx reader: Add tests for hanging indent handline.

We want to treat it as a plain paragraph if the hanging amount is greater to or equal to the left indent---i.e., if the first line has zero indentation. But we still want it to be a block quote if it starts to the right of the margin. Someone might format verse with wrapping lines with a hanging indent, for example.

commit1405e7b7091dedb50578c9e0cafd62f2c77ca689 authorJesse Rosenthal <jrosenthal@jhu.edu> dateSun 29 Jun 2014, 23:37 (12 years ago) parent0f59196
3 files changed+7
tests/Tests/Readers/Docx.hs+4 tests/docx.hanging_indent.docx tests/docx.hanging_indent.native+3
tests/Tests/Readers/Docx.hs+4
@@ -112,6 +112,10 @@ tests = [ testGroup "inlines"
112112 "blockquotes (parsing indent as blockquote)"
113113 "docx.block_quotes.docx"
114114 "docx.block_quotes_parse_indent.native"
115+ , testCompare
116+ "hanging indents"
117+ "docx.hanging_indent.docx"
118+ "docx.hanging_indent.native"
115119 , testCompare
116120 "tables"
117121 "docx.tables.docx"
tests/docx.hanging_indent.docxnew file

Binary file not shown.

tests/docx.hanging_indent.nativenew file+3
@@ -0,0 +1,3 @@
1+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "hanging",Space,Str "indent,",Space,Str "with",Space,Str "the",Space,Str "left",Space,Str "side",Space,Str "set",Space,Str "to",Space,Str "the",Space,Str "left",Space,Str "margin,",Space,Str "and",Space,Str "it",Space,Str "wraps",Space,Str "around",Space,Str "the",Space,Str "line."]
2+,BlockQuote
3+ [Para [Str "Five",Space,Str "years",Space,Str "have",Space,Str "passed,",Space,Str "five",Space,Str "summers",Space,Str "with",Space,Str "the",Space,Str "length"]]]