summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Org.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-06-16 22:03:26 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-06-16 22:03:26 -0700
commit78ee2416d105bd25337819a49835623a8a296224 (patch)
tree34a2377c965b9ad9cc4601e7a8e333b3b79ffd84 /src/Text/Pandoc/Readers/Org.hs
parentf9b97e6bfb1d26bd328cdbb1ca83c4558e7f4a0c (diff)
Org reader: make tildes create inline code.
Closes #1345. Also relabeled 'code' and 'verbatim' parsers to accord with the org-mode manual. I'm not sure what the distinction between code and verbatim is supposed to be, but I'm pretty sure both should be represented as Code inlines in pandoc. The previous behavior resulted in the text not appearing in any output format.
Diffstat (limited to 'src/Text/Pandoc/Readers/Org.hs')
-rw-r--r--src/Text/Pandoc/Readers/Org.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs
index 0e872abf0..7a35e2ca0 100644
--- a/src/Text/Pandoc/Readers/Org.hs
+++ b/src/Text/Pandoc/Readers/Org.hs
@@ -1148,11 +1148,11 @@ strikeout = fmap B.strikeout <$> emphasisBetween '+'
underline :: OrgParser (F Inlines)
underline = fmap B.strong <$> emphasisBetween '_'
-code :: OrgParser (F Inlines)
-code = return . B.code <$> verbatimBetween '='
-
verbatim :: OrgParser (F Inlines)
-verbatim = return . B.rawInline "" <$> verbatimBetween '~'
+verbatim = return . B.code <$> verbatimBetween '='
+
+code :: OrgParser (F Inlines)
+code = return . B.code <$> verbatimBetween '~'
subscript :: OrgParser (F Inlines)
subscript = fmap B.subscript <$> try (char '_' *> subOrSuperExpr)