File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed
src/Text/Pandoc/Readers/LaTeX Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -490,7 +490,11 @@ parseFromToks parser toks = do
490490 case toks of
491491 Tok pos _ _ : _ -> setPosition pos
492492 _ -> return ()
493- result <- disablingWithRaw parser
493+ -- we ignore existing raw tokens maps (see #9517)
494+ oldRawTokens <- sRawTokens <$> getState
495+ updateState $ \ st -> st{ sRawTokens = mempty }
496+ result <- parser
497+ updateState $ \ st -> st{ sRawTokens = oldRawTokens }
494498 setInput oldInput
495499 setPosition oldpos
496500 return result
Original file line number Diff line number Diff line change 1+ ```
2+ % pandoc -f latex+raw_tex -t native
3+ \begin{tabular}{l}
4+ \begin{theorem}
5+ Cats
6+ \end{theorem}
7+ \end{tabular}
8+ ^D
9+ [ Table
10+ ( "" , [] , [] )
11+ (Caption Nothing [])
12+ [ ( AlignLeft , ColWidthDefault ) ]
13+ (TableHead ( "" , [] , [] ) [])
14+ [ TableBody
15+ ( "" , [] , [] )
16+ (RowHeadColumns 0)
17+ []
18+ [ Row
19+ ( "" , [] , [] )
20+ [ Cell
21+ ( "" , [] , [] )
22+ AlignDefault
23+ (RowSpan 1)
24+ (ColSpan 1)
25+ [ RawBlock
26+ (Format "latex")
27+ "\\begin{theorem}\nCats\n\\end{theorem}"
28+ ]
29+ ]
30+ ]
31+ ]
32+ (TableFoot ( "" , [] , [] ) [])
33+ ]
34+ ```
You can’t perform that action at this time.
0 commit comments