git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'underline-option' of https://github.com/jkr/pandoc
1b9371cJohn MacFarlane
src/Text/Pandoc/Readers/Docx.hs+2−1
@@ -219,7 +219,8 @@ runStyleToContainers rPr =
219 , if isStrike rPr then (Just Strikeout) else Nothing
219 , if isStrike rPr then (Just Strikeout) else Nothing
220 , if isSuperScript rPr then (Just Superscript) else Nothing
220 , if isSuperScript rPr then (Just Superscript) else Nothing
221 , if isSubScript rPr then (Just Subscript) else Nothing
221 , 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)
223 ]
224 ]
224 in
225 in
225 classContainers ++ formatters
226 classContainers ++ formatters
tests/docx.inline_formatting.native+1−1
@@ -1,5 +1,5 @@
1[Para [Str "Regular",Space,Str "text",Space,Emph [Str "italics"],Space,Strong [Str "bold",Space,Emph [Str "bold",Space,Str "italics"]],Str "."]
1[Para [Str "Regular",Space,Str "text",Space,Emph [Str "italics"],Space,Strong [Str "bold",Space,Emph [Str "bold",Space,Str "italics"]],Str "."]
2,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 "."]
2,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 "."]
4,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 "."]
4,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 "."]
5,Para [Str "A",Space,Str "line",LineBreak,Str "break."]]
5,Para [Str "A",Space,Str "line",LineBreak,Str "break."]]