aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-23 00:49:57 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-23 00:49:57 -0700
commita7819c644058eac142da3755d609e1f149753271 (patch)
tree05e8a3f470937f7b4d877ecb8670c74319642dd4 /src/Text/Pandoc
parentc6590b193d0a05fa251a4ed2dff946615a896c78 (diff)
downloadpandoc-a7819c644058eac142da3755d609e1f149753271.tar.gz
Man reader: allow any nonspace char for macro name.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Man.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs
index dcdaad474..701ab55d5 100644
--- a/src/Text/Pandoc/Readers/Man.hs
+++ b/src/Text/Pandoc/Readers/Man.hs
@@ -40,7 +40,7 @@ import Control.Monad (liftM, void, mzero, guard)
import Control.Monad.Except (throwError)
import Text.Pandoc.Class
(getResourcePath, readFileFromDirs, PandocMonad(..), report)
-import Data.Char (isHexDigit, chr, ord, isAscii, isAlphaNum)
+import Data.Char (isHexDigit, chr, ord, isAscii, isAlphaNum, isSpace)
import Data.Default (Default)
import Data.Maybe (catMaybes)
import qualified Data.Map as M
@@ -293,7 +293,7 @@ lexMacro = do
pos <- getPosition
char '.' <|> char '\''
many spacetab
- macroName <- many (letter <|> oneOf ['\\', '"', '&', '.'])
+ macroName <- many (satisfy (not . isSpace))
args <- lexArgs
case macroName of
@@ -301,6 +301,7 @@ lexMacro = do
"\\\"" -> return mempty
"\\#" -> return mempty
"de" -> lexMacroDef args
+ "de1" -> lexMacroDef args
"ds" -> lexStringDef args
"ds1" -> lexStringDef args
"sp" -> return $ singleTok MEmptyLine