git.iko.soy/typeable/pandoc
on master help sign in
Muse writer: escape empty strings

This guarantees that conditionalEscapeString never returns empty string.

commitbd2bd9aeaab8a49372ba73d884a29f9ad1c8e9b7 authorAlexander Krotov <ilabdsf@gmail.com> dateSat 1 Sep 2018, 17:44 (8 years ago) parent23ed97f
1 file changed+2−1
src/Text/Pandoc/Writers/Muse.hs+2−1
src/Text/Pandoc/Writers/Muse.hs+2−1
@@ -327,7 +327,8 @@ shouldEscapeString :: PandocMonad m
327327 -> Muse m Bool
328328shouldEscapeString s = do
329329 insideLink <- asks envInsideLinkDescription
330− return $ any (`elem` ("#*<=|" :: String)) s ||
330+ return $ null s ||
331+ any (`elem` ("#*<=|" :: String)) s ||
331332 "::" `isInfixOf` s ||
332333 "~~" `isInfixOf` s ||
333334 "[[" `isInfixOf` s ||