Org writer: support arbitrary raw inlines

Org mode allows arbitrary raw inlines ("export snippets" in Emacs
parlance) to be included as `@@format:raw foreign format text@@`.

Support for this features is added to the Org writer.
This commit is contained in:
Albert Krewinkel 2016-06-13 23:13:05 +02:00
parent 43382cead2
commit cf2502de8f

View file

@ -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