git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'underline-option' of https://github.com/jkr/pandoc
commit1b9371cfdf279301ecc50910664d7335508ade71 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 31 Jul 2014, 16:40 (12 years ago) parentf075b0e43ca784
2 files changed+3−2
src/Text/Pandoc/Readers/Docx.hs+2−1 tests/docx.inline_formatting.native+1−1
src/Text/Pandoc/Readers/Docx.hs+2−1
@@ -219,7 +219,8 @@ runStyleToContainers rPr =
219219 , if isStrike rPr then (Just Strikeout) else Nothing
220220 , if isSuperScript rPr then (Just Superscript) else Nothing
221221 , if isSubScript rPr then (Just Subscript) else Nothing
222− , rUnderline rPr >>= (\f -> Just $ Span ("", [], [("underline", f)]))
222+ , rUnderline rPr >>=
223+ (\f -> if f == "single" then (Just Emph) else Nothing)
223224 ]
224225 in
225226 classContainers ++ formatters
tests/docx.inline_formatting.native+1−1
@@ -1,5 +1,5 @@
11[Para [Str "Regular",Space,Str "text",Space,Emph [Str "italics"],Space,Strong [Str "bold",Space,Emph [Str "bold",Space,Str "italics"]],Str "."]
22,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "Small",Space,Str "Caps"],Str ",",Space,Str "and",Space,Str "this",Space,Str "is",Space,Strikeout [Str "strikethrough"],Str "."]
3−,Para [Str "Some",Space,Str "people",Space,Str "use",Space,Span ("",[],[("underline","single")]) [Str "single",Space,Str "underlines",Space,Str "for",Space,Emph [Str "emphasis"]],Str "."]
3+,Para [Str "Some",Space,Str "people",Space,Str "use",Space,Emph [Str "single",Space,Str "underlines",Space,Str "for",Space,Emph [Str "emphasis"]],Str "."]
44,Para [Str "Above",Space,Str "the",Space,Str "line",Space,Str "is",Space,Superscript [Str "superscript"],Space,Str "and",Space,Str "below",Space,Str "the",Space,Str "line",Space,Str "is",Space,Subscript [Str "subscript"],Str "."]
55,Para [Str "A",Space,Str "line",LineBreak,Str "break."]]