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:
parent
43382cead2
commit
cf2502de8f
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue