diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-06-14 20:21:37 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-14 20:21:37 -0600 |
commit | 15d2c09ba134094afe8fb4b74ccf50754f11e865 (patch) | |
tree | 16de375633d41f5e660617cffe5b1c6c8b3d8c8b /src/Text/Pandoc/Writers | |
parent | 5ea3cc647b2645baeb6247d8bc422989d87b42aa (diff) | |
parent | 29552eff3e1c0a7eab8b114ac58ca83422a84fb0 (diff) | |
download | pandoc-15d2c09ba134094afe8fb4b74ccf50754f11e865.tar.gz |
Merge pull request #2980 from tarleb/org-raw-inlines
Org reader: raw inlines in arbitrary formats
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Org.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs index f87aeca81..79ca37395 100644 --- a/src/Text/Pandoc/Writers/Org.hs +++ b/src/Text/Pandoc/Writers/Org.hs @@ -305,9 +305,10 @@ inlineToOrg (Math t str) = do return $ if t == InlineMath then "$" <> text str <> "$" else "$$" <> text str <> "$$" -inlineToOrg (RawInline f str) | isRawFormat f = - return $ text str -inlineToOrg (RawInline _ _) = return empty +inlineToOrg (RawInline f@(Format f') str) = + return $ if isRawFormat f + then text str + else "@@" <> text f' <> ":" <> text str <> "@@" inlineToOrg (LineBreak) = return (text "\\\\" <> cr) inlineToOrg Space = return space inlineToOrg SoftBreak = do |