Muse writer: escape empty strings

This guarantees that conditionalEscapeString never returns empty string.
This commit is contained in:
Alexander Krotov 2018-09-01 17:44:17 +03:00
parent 23ed97f081
commit bd2bd9aeaa

View file

@ -327,7 +327,8 @@ shouldEscapeString :: PandocMonad m
-> Muse m Bool
shouldEscapeString s = do
insideLink <- asks envInsideLinkDescription
return $ any (`elem` ("#*<=|" :: String)) s ||
return $ null s ||
any (`elem` ("#*<=|" :: String)) s ||
"::" `isInfixOf` s ||
"~~" `isInfixOf` s ||
"[[" `isInfixOf` s ||