diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2017-12-04 15:59:26 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2017-12-04 15:59:26 +0300 |
commit | ed261e58320038601ec37a78cb5fe94f2013ca66 (patch) | |
tree | 0f1a9c785e976694ed74c1d474a3285e12ca65db /src/Text | |
parent | 4235c2d416fdfce27664d5e2f481a368a70ef949 (diff) | |
download | pandoc-ed261e58320038601ec37a78cb5fe94f2013ca66.tar.gz |
Muse reader: add underline support in Emacs Muse mode
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index f10a2172f..0688b479c 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -57,7 +57,7 @@ import Text.Pandoc.Logging import Text.Pandoc.Options import Text.Pandoc.Parsing import Text.Pandoc.Readers.HTML (htmlTag) -import Text.Pandoc.Shared (crFilter) +import Text.Pandoc.Shared (crFilter, underlineSpan) -- | Read Muse from an input string and return a Pandoc document. readMuse :: PandocMonad m @@ -577,6 +577,7 @@ inlineList = [ endline , strongTag , emph , emphTag + , underlined , superscriptTag , subscriptTag , strikeoutTag @@ -666,6 +667,11 @@ strong = fmap B.strong <$> emphasisBetween (string "**") emph :: PandocMonad m => MuseParser m (F Inlines) emph = fmap B.emph <$> emphasisBetween (char '*') +underlined :: PandocMonad m => MuseParser m (F Inlines) +underlined = do + guardDisabled Ext_amuse -- Supported only by Emacs Muse + fmap underlineSpan <$> emphasisBetween (char '_') + emphTag :: PandocMonad m => MuseParser m (F Inlines) emphTag = inlineTag B.emph "em" |