diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-23 10:55:56 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-26 17:22:53 -0800 |
commit | bd43c0f4c940b755e2d68c7146c7f5201fb181d9 (patch) | |
tree | 502cab13026c8a3263387ae4578cbf5e7fc6a2b7 /src/Text/Pandoc/Writers/Org.hs | |
parent | 5bee388914283825491bc1256162f9744743d976 (diff) |
Bumped version to 1.8; depend on pandoc-types 1.8.
The old TeX, HtmlInline and RawHtml elements have been removed
and replaced by generic RawInline and RawBlock elements.
All modules updated to use the new raw elements.
Diffstat (limited to 'src/Text/Pandoc/Writers/Org.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Org.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs index 59f7e14f5..af4070696 100644 --- a/src/Text/Pandoc/Writers/Org.hs +++ b/src/Text/Pandoc/Writers/Org.hs @@ -115,9 +115,12 @@ blockToOrg (Para [Image txt (src,tit)]) = do blockToOrg (Para inlines) = do contents <- inlineListToOrg inlines return $ contents <> blankline -blockToOrg (RawHtml str) = +blockToOrg (RawBlock "html" str) = return $ blankline $$ "#+BEGIN_HTML" $$ nest 2 (text str) $$ "#+END_HTML" $$ blankline +blockToOrg (RawBlock "latex" str) = return $ text str +blockToOrg (RawBlock "org" str) = return $ text str +blockToOrg (RawBlock _ _) = return empty blockToOrg HorizontalRule = return $ blankline $$ "--------------" $$ blankline blockToOrg (Header level inlines) = do contents <- inlineListToOrg inlines @@ -257,8 +260,8 @@ inlineToOrg (Math t str) = do return $ if t == InlineMath then "$" <> text str <> "$" else "$$" <> text str <> "$$" -inlineToOrg (TeX str) = return $ text str -inlineToOrg (HtmlInline _) = return empty +inlineToOrg (RawInline "latex" str) = return $ text str +inlineToOrg (RawInline _ _) = return empty inlineToOrg (LineBreak) = return cr -- there's no line break in Org inlineToOrg Space = return space inlineToOrg (Link txt (src, _)) = do |