diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-04-26 15:39:49 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-07-19 22:51:59 -0700 |
commit | 8d523d80d4120413f6b62bf833d6da8f2a69b925 (patch) | |
tree | 67a50ffd0a36ab63d90099cc6acc5b28ea8b1672 /src/Text/Pandoc/Readers | |
parent | 0db4702042344e3b670a53480bb0ab5b41eb9aeb (diff) | |
download | pandoc-8d523d80d4120413f6b62bf833d6da8f2a69b925.tar.gz |
Add generic `attributes` extension.
This allows attributes to be added to any block or inline
element, in principle. (Though in many cases this will be
done by adding a Div or Span container, since pandoc's
AST doesn't have a slot for attributes for most elements.)
Currently this is only possible with the commonmark and gfm
readers.
Add `Ext_attributes` constructor for `Extension` [API change].
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/CommonMark.hs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/CommonMark.hs b/src/Text/Pandoc/Readers/CommonMark.hs index d2bde1d2a..a85d9aa37 100644 --- a/src/Text/Pandoc/Readers/CommonMark.hs +++ b/src/Text/Pandoc/Readers/CommonMark.hs @@ -48,10 +48,7 @@ readCommonMark opts s = do [ fencedDivSpec | isEnabled Ext_fenced_divs opts ] ++ [ bracketedSpanSpec | isEnabled Ext_bracketed_spans opts ] ++ [ rawAttributeSpec | isEnabled Ext_raw_attribute opts ] ++ - [ attributesSpec | isEnabled Ext_link_attributes opts || - isEnabled Ext_inline_code_attributes opts || - isEnabled Ext_fenced_code_attributes opts || - isEnabled Ext_header_attributes opts ] ++ + [ attributesSpec | isEnabled Ext_attributes opts ] ++ [ pipeTableSpec | isEnabled Ext_pipe_tables opts ] ++ [ autolinkSpec | isEnabled Ext_autolink_bare_uris opts ] ++ [ emojiSpec | isEnabled Ext_emoji opts ] ++ |