aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-11-19 10:03:12 -0800
committerJohn MacFarlane <[email protected]>2022-11-19 10:43:10 -0800
commit663e43187340f3f2bd77bb0716f795bb023e5b5d (patch)
treea26b0a765b5a571871c82cf3cace22848bdd508a
parent202eacb6860967e6c74e8bc73eb8a4a677748243 (diff)
Extensions: Add `Ext_mark` extension.
This is for highlighting blocks of text. This is not part of the pandoc extensions by default. See #7743.
-rw-r--r--MANUAL.txt7
-rw-r--r--src/Text/Pandoc/Extensions.hs2
2 files changed, 9 insertions, 0 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index eb1a50d72..4a67e4651 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -5577,6 +5577,13 @@ be rewritten relative to the file containing the link
reference definition, not the file containing the reference link
or image itself, if these differ.
+#### Extension: `mark` ####
+
+To highlight out a section of text, begin and end it with
+with `==`. Thus, for example,
+
+ This ==is deleted text.==
+
#### Extension: `attributes` ####
Allows attributes to be attached to any inline or block-level
diff --git a/src/Text/Pandoc/Extensions.hs b/src/Text/Pandoc/Extensions.hs
index 1751295ad..efe4ed879 100644
--- a/src/Text/Pandoc/Extensions.hs
+++ b/src/Text/Pandoc/Extensions.hs
@@ -95,6 +95,7 @@ data Extension =
| Ext_link_attributes -- ^ link and image attributes
| Ext_lists_without_preceding_blankline -- ^ Allow lists without preceding blank
| Ext_literate_haskell -- ^ Enable literate Haskell conventions
+ | Ext_mark -- ^ Enable ==mark== syntax to highlight text
| Ext_markdown_attribute -- ^ Interpret text inside HTML as markdown iff
-- container has attribute 'markdown'
| Ext_markdown_in_html_blocks -- ^ Interpret as markdown inside HTML blocks
@@ -485,6 +486,7 @@ getAllExtensions f = universalExtensions <> getAll f
, Ext_mmd_title_block
, Ext_abbreviations
, Ext_autolink_bare_uris
+ , Ext_mark
, Ext_mmd_link_attributes
, Ext_mmd_header_identifiers
, Ext_compact_definition_lists