From c2993a6fc6882ed4b5fc4162238cfda8f84dbc81 Mon Sep 17 00:00:00 2001
From: Alexander Krotov <ilabdsf@gmail.com>
Date: Mon, 27 Nov 2017 12:24:55 +0300
Subject: Muse reader: parse "~~" as non-breaking space in Emacs mode

---
 src/Text/Pandoc/Readers/Muse.hs | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'src')

diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 4f9e9697d..794ca7385 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -581,6 +581,7 @@ inlineList = [ endline
              , subscriptTag
              , strikeoutTag
              , verbatimTag
+             , nbsp
              , link
              , code
              , codeTag
@@ -682,6 +683,12 @@ verbatimTag = do
   content <- parseHtmlContent "verbatim" anyChar
   return $ return $ B.text content
 
+nbsp :: PandocMonad m => MuseParser m (F Inlines)
+nbsp = do
+  guardDisabled Ext_amuse -- Supported only by Emacs Muse
+  string "~~"
+  return $ return $ B.str "\160"
+
 code :: PandocMonad m => MuseParser m (F Inlines)
 code = try $ do
   pos <- getPosition
-- 
cgit v1.2.3