Changed Ext_tex_math to Ext_tex_math_dollars.

This commit is contained in:
John MacFarlane 2012-08-10 21:51:54 -07:00
parent 88804c89bb
commit 417cde38af
3 changed files with 5 additions and 5 deletions

2
README
View file

@ -1752,7 +1752,7 @@ Attributes can be attached to verbatim text, just as with
Math
----
**Extension: `tex_math`**
**Extension: `tex_math_dollars`**
Anything between two `$` characters will be treated as TeX math. The
opening `$` must have a character immediately to its right, while the

View file

@ -57,7 +57,7 @@ data Extension = Ext_footnotes
| Ext_pipe_tables
| Ext_citations
| Ext_raw_tex
| Ext_tex_math
| Ext_tex_math_dollars
| Ext_latex_macros
| Ext_delimited_code_blocks
| Ext_inline_code_attributes
@ -93,7 +93,7 @@ pandocExtensions = Set.fromList
, Ext_pipe_tables
, Ext_citations
, Ext_raw_tex
, Ext_tex_math
, Ext_tex_math_dollars
, Ext_latex_macros
, Ext_delimited_code_blocks
, Ext_inline_code_attributes

View file

@ -1184,13 +1184,13 @@ math = (return . B.displayMath <$> (mathDisplay >>= applyMacros'))
mathDisplay :: Parser [Char] ParserState String
mathDisplay = try $ do
guardEnabled Ext_tex_math
guardEnabled Ext_tex_math_dollars
string "$$"
many1Till (noneOf "\n" <|> (newline >>~ notFollowedBy' blankline)) (try $ string "$$")
mathInline :: Parser [Char] ParserState String
mathInline = try $ do
guardEnabled Ext_tex_math
guardEnabled Ext_tex_math_dollars
char '$'
notFollowedBy space
words' <- sepBy1 mathWord (many1 (spaceChar <|> (newline >>~ notFollowedBy' blankline)))