diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-11-11 13:27:25 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-11-11 13:46:23 -0800 |
commit | a36d202e862f3fe0652e4f46cf7713120f50be28 (patch) | |
tree | 57b26749c5aff5e02e379fd5ae9824e513677fd4 /MANUAL.txt | |
parent | ca17ae52465e0194b97d38b9a065a8186cb23a6d (diff) | |
download | pandoc-a36d202e862f3fe0652e4f46cf7713120f50be28.tar.gz |
Text.Pandoc.Shared: add parameter to uniqueIdent, inlineListToIdentifier.
The parameter is Extensions. This allows these functions to
be sensitive to the settings of `Ext_gfm_auto_identifiers` and
`Ext_ascii_identifiers`.
This allows us to use `uniqueIdent` in the CommonMark reader,
replacing some custom code.
It also means that `gfm_auto_identifiers` can now be used
in all formats.
Semantically, `gfm_auto_identifiers` is now a modifier of
`auto_identifiers`; for identifiers to be set, `auto_identifiers`
must be turned on, and then the type of identifier produced
depends on `gfm_auto_identifiers` and `ascii_identifiers` are set.
Closes #5057.
Diffstat (limited to 'MANUAL.txt')
-rw-r--r-- | MANUAL.txt | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index 726219b1b..d712ae998 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -1852,7 +1852,8 @@ output formats enabled by default in : `markdown`, `muse` -The algorithm used to derive the identifier from the header text is: +The default algorithm used to derive the identifier from the +header text is: - Remove all formatting, links, etc. - Remove all footnotes. @@ -1879,6 +1880,9 @@ same text; in this case, the first will get an identifier as described above; the second will get the same identifier with `-1` appended; the third with `-2`; and so on. +(However, a different algorithm is used if +`gfm_auto_identifiers` is enabled; see below.) + These identifiers are used to provide link targets in the table of contents generated by the `--toc|--table-of-contents` option. They also make it easy to provide links from one section of a document to @@ -1903,6 +1907,13 @@ Causes the identifiers produced by `auto_identifiers` to be pure ASCII. Accents are stripped off of accented Latin letters, and non-Latin letters are omitted. +#### Extension: `gfm_auto_identifiers` #### + +Changes the algorithm used by `auto_identifiers` to conform to +GitHub's method. Spaces are converted to dashes (`-`), +uppercase characters to lowercase characters, and punctuation +characters other than `-` and `_` are removed. + Math Input ---------- @@ -4189,10 +4200,11 @@ variants are supported: `shortcut_reference_links`, `spaced_reference_links`. `markdown_github` (deprecated GitHub-Flavored Markdown) -: `pipe_tables`, `raw_html`, `fenced_code_blocks`, `gfm_auto_identifiers`, - `ascii_identifiers`, `backtick_code_blocks`, `autolink_bare_uris`, - `space_in_atx_header`, `intraword_underscores`, `strikeout`, - `emoji`, `shortcut_reference_links`, `angle_brackets_escapable`, +: `pipe_tables`, `raw_html`, `fenced_code_blocks`, `auto_identifiers`, + `gfm_auto_identifiers`, `backtick_code_blocks`, + `autolink_bare_uris`, `space_in_atx_header`, + `intraword_underscores`, `strikeout`, `emoji`, + `shortcut_reference_links`, `angle_brackets_escapable`, `lists_without_preceding_blankline`. `markdown_mmd` (MultiMarkdown) @@ -4219,10 +4231,13 @@ individually disabled. Also, `raw_tex` only affects `gfm` output, not input. `gfm` (GitHub-Flavored Markdown) -: `pipe_tables`, `raw_html`, `fenced_code_blocks`, `gfm_auto_identifiers`, - `backtick_code_blocks`, `autolink_bare_uris`, - `intraword_underscores`, `strikeout`, `hard_line_breaks`, `emoji`, - `shortcut_reference_links`, `angle_brackets_escapable`. +: `pipe_tables`, `raw_html`, `fenced_code_blocks`, `auto_identifiers`, + `gfm_auto_identifiers`, `backtick_code_blocks`, + `autolink_bare_uris`, `space_in_atx_header`, + `intraword_underscores`, `strikeout`, `emoji`, + `shortcut_reference_links`, `angle_brackets_escapable`, + `lists_without_preceding_blankline`. + Producing slide shows with pandoc ================================= |