diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-07-20 17:44:28 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-07-20 17:44:28 -0700 |
commit | b6c769084eff0fe865c13590dee0737e41ba4e43 (patch) | |
tree | d2231e7b5d04ff25acdef5739ab5961c28eadc9d /src/Text/Pandoc/Parsing.hs | |
parent | a243afb55104b0e5e1ddf62f301477a545381634 (diff) |
Fix behavior of `markdown_attribute` extension.
It now works as in PHP markdown extra. Setting `markdown="1"` on
an outer tag affects all contained tags until it is reversed with
`markdown="0"`. Closes #1378.
Added `stateMarkdownAttribute` to `ParserState`.
Diffstat (limited to 'src/Text/Pandoc/Parsing.hs')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 54c645fc5..f4f9178d0 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -879,6 +879,7 @@ data ParserState = ParserState -- annotate role classes too). stateCaption :: Maybe Inlines, -- ^ Caption in current environment stateInHtmlBlock :: Maybe String, -- ^ Tag type of HTML block being parsed + stateMarkdownAttribute :: Bool, -- ^ True if in markdown=1 context stateWarnings :: [String] -- ^ Warnings generated by the parser } @@ -958,6 +959,7 @@ defaultParserState = stateRstCustomRoles = M.empty, stateCaption = Nothing, stateInHtmlBlock = Nothing, + stateMarkdownAttribute = False, stateWarnings = []} -- | Succeed only if the extension is enabled. |