git.iko.soy/typeable/pandoc
on master help sign in
Textile reader: Removed raw LaTeX parsing.
bb61624John MacFarlane
src/Text/Pandoc/Readers/Textile.hs−16
@@ -56,7 +56,6 @@ import Text.Pandoc.Shared
56import Text.Pandoc.Options
56import Text.Pandoc.Options
57import Text.Pandoc.Parsing
57import Text.Pandoc.Parsing
58import Text.Pandoc.Readers.HTML ( htmlTag, isInlineTag, isBlockTag )
58import Text.Pandoc.Readers.HTML ( htmlTag, isInlineTag, isBlockTag )
59−import Text.Pandoc.Readers.LaTeX ( rawLaTeXInline, rawLaTeXBlock )
60import Text.HTML.TagSoup (parseTags, innerText, fromAttrib, Tag(..))
59import Text.HTML.TagSoup (parseTags, innerText, fromAttrib, Tag(..))
61import Text.HTML.TagSoup.Match
60import Text.HTML.TagSoup.Match
62import Data.List ( intercalate )
61import Data.List ( intercalate )
@@ -126,7 +125,6 @@ blockParsers = [ codeBlock
126 , commentBlock
125 , commentBlock
127 , anyList
126 , anyList
128 , rawHtmlBlock
127 , rawHtmlBlock
129− , rawLaTeXBlock'
130 , maybeExplicitBlock "table" table
128 , maybeExplicitBlock "table" table
131 , maybeExplicitBlock "p" para
129 , maybeExplicitBlock "p" para
132 ]
130 ]
@@ -292,13 +290,6 @@ rawHtmlBlock = try $ do
292 optional blanklines
290 optional blanklines
293 return $ RawBlock "html" b
291 return $ RawBlock "html" b
294
292
295−-- | Raw block of LaTeX content
296−rawLaTeXBlock' :: Parser [Char] ParserState Block
297−rawLaTeXBlock' = do
298− guardEnabled Ext_raw_tex
299− RawBlock "latex" <$> (rawLaTeXBlock <* spaces)
300−
301−
302-- | In textile, paragraphs are separated by blank lines.
293-- | In textile, paragraphs are separated by blank lines.
303para :: Parser [Char] ParserState Block
294para :: Parser [Char] ParserState Block
304para = try $ Para . normalizeSpaces <$> manyTill inline blockBreak
295para = try $ Para . normalizeSpaces <$> manyTill inline blockBreak
@@ -373,7 +364,6 @@ inlineParsers = [ str
373 , escapedInline
364 , escapedInline
374 , htmlSpan
365 , htmlSpan
375 , rawHtmlInline
366 , rawHtmlInline
376− , rawLaTeXInline'
377 , note
367 , note
378 , try $ (char '[' *> inlineMarkup <* char ']')
368 , try $ (char '[' *> inlineMarkup <* char ']')
379 , inlineMarkup
369 , inlineMarkup
@@ -489,12 +479,6 @@ endline = try $ do
489rawHtmlInline :: Parser [Char] ParserState Inline
479rawHtmlInline :: Parser [Char] ParserState Inline
490rawHtmlInline = RawInline "html" . snd <$> htmlTag isInlineTag
480rawHtmlInline = RawInline "html" . snd <$> htmlTag isInlineTag
491
481
492−-- | Raw LaTeX Inline
493−rawLaTeXInline' :: Parser [Char] ParserState Inline
494−rawLaTeXInline' = try $ do
495− guardEnabled Ext_raw_tex
496− rawLaTeXInline
497−
498-- | Textile standard link syntax is "label":target. But we
482-- | Textile standard link syntax is "label":target. But we
499-- can also have ["label":target].
483-- can also have ["label":target].
500link :: Parser [Char] ParserState Inline
484link :: Parser [Char] ParserState Inline