@@ -66,10 +66,6 @@ hruleChars = "*-_"
6666setextHChars :: [Char]
6767setextHChars = "=-"
6868
69−-- treat these as potentially non-text when parsing inline:
70−specialChars :: [Char]
71−specialChars = "\\[]*_~`<>$!^-.&@'\";\8216\8217\8220\8221"
72−
7369--
7470-- auxiliary functions
7571--
@@ -296,6 +292,7 @@ block = do
296292 , bulletList
297293 , orderedList
298294 , definitionList
295+ , rawTeXBlock
299296 , para
300297 , rawHtmlBlocks
301298 , plain
@@ -698,6 +695,13 @@ rawVerbatimBlock = try $ do
698695 contents <- manyTill anyChar (htmlTag (~== TagClose tag))
699696 return $ open ++ contents ++ renderTags [TagClose tag]
700697
698+rawTeXBlock :: GenParser Char ParserState Block
699+rawTeXBlock = do
700+ failIfStrict
701+ result <- rawLaTeXEnvironment' <|> rawConTeXtEnvironment'
702+ spaces
703+ return $ Para [TeX result]
704+
701705rawHtmlBlocks :: GenParser Char ParserState Block
702706rawHtmlBlocks = do
703707 htmlBlocks <- many1 $ do blk <- rawVerbatimBlock <|>
@@ -933,9 +937,6 @@ ltSign = do
933937 else notFollowedBy' rawHtmlBlocks >> char '<' -- unless it starts html
934938 return $ Str ['<']
935939
936−specialCharsMinusLt :: [Char]
937−specialCharsMinusLt = filter (/= '<') specialChars
938−
939940exampleRef :: GenParser Char ParserState Inline
940941exampleRef = try $ do
941942 char '@'
@@ -1028,9 +1029,6 @@ whitespace = spaceChar >>
10281029nonEndline :: GenParser Char st Char
10291030nonEndline = satisfy (/='\n')
10301031
1031−strChar :: GenParser Char st Char
1032−strChar = noneOf (specialChars ++ " \t\n")
1033−
10341032str :: GenParser Char ParserState Inline
10351033str = do
10361034 a <- alphaNum