Fixed handling of Quoted inline elements to use unicode left & right quotes.
Added inQuotes auxiliary function. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1261 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
c2e207a1f6
commit
4988441f3c
1 changed files with 6 additions and 2 deletions
|
@ -94,6 +94,10 @@ inHeaderTags :: Int -> Doc -> Doc
|
|||
inHeaderTags i = inTags False "text:h" [ ("text:style-name", "Heading_20_" ++ show i)
|
||||
, ("text:outline-level", show i)]
|
||||
|
||||
inQuotes :: QuoteType -> Doc -> Doc
|
||||
inQuotes SingleQuote s = text "‘" <> s <> text "’"
|
||||
inQuotes DoubleQuote s = text "“" <> s <> text "”"
|
||||
|
||||
-- | Convert list of authors to a docbook <author> section
|
||||
authorToOpenDocument :: [Char] -> Doc
|
||||
authorToOpenDocument name =
|
||||
|
@ -297,7 +301,7 @@ inlineToOpenDocument o ils
|
|||
| Ellipses <- ils = return $ text "…"
|
||||
| EmDash <- ils = return $ text "—"
|
||||
| EnDash <- ils = return $ text "–"
|
||||
| Apostrophe <- ils = return $ char '\''
|
||||
| Apostrophe <- ils = return $ text "’"
|
||||
| Space <- ils = return $ char ' '
|
||||
| LineBreak <- ils = return $ selfClosingTag "text:line-break" []
|
||||
| Str s <- ils = return $ text $ escapeStringForXML s
|
||||
|
@ -306,7 +310,7 @@ inlineToOpenDocument o ils
|
|||
| Strikeout l <- ils = inSpanTags "Strikeout" <$> inlinesToOpenDocument o l
|
||||
| Superscript l <- ils = inSpanTags "Superscript" <$> inlinesToOpenDocument o l
|
||||
| Subscript l <- ils = inSpanTags "Subscript" <$> inlinesToOpenDocument o l
|
||||
| Quoted _ l <- ils = inSpanTags "Citation" <$> inlinesToOpenDocument o l
|
||||
| Quoted t l <- ils = inQuotes t <$> inlinesToOpenDocument o l
|
||||
| Code s <- ils = preformatted s
|
||||
| Math s <- ils = inlinesToOpenDocument o (readTeXMath s)
|
||||
| TeX s <- ils = preformatted s
|
||||
|
|
Loading…
Reference in a new issue