-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix toc levels parsing as per documentation
- Loading branch information
Showing
7 changed files
with
383 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,49 @@ | ||
**flexmark-java table of contents extension** | ||
|
||
flexmark-java extension for converting `[TOC level=` ***#*** `]` to an HTML rendered table of contents | ||
Converts `[TOC style]` text to TocBlock nodes and | ||
|
||
Or Sim TOC tag, which has the following format: `[TOC style]: # "Title"` and includes all | ||
following lines until a blank line. <!--SimTocContent--> | ||
|
||
|
||
Lines after the TOC tag are added to the `SimTocContent` child node of the SimToc block. | ||
|
||
The intention for this tag is to have the `SimTocContent` updated to reflect the content of the | ||
document. | ||
|
||
|
||
|
||
1. `style` consists of space separated list of options: | ||
|
||
* `levels=levelList` where level list is a comma separated list of levels or ranges. Default | ||
is to include heading levels 2 and 3. Examples: | ||
* `levels=4` include levels 2,3 and 4 | ||
* `levels=2-4` include levels 2,3 and 4. same as `levels=4` | ||
* `levels=2-4,5` include levels 2,3,4 and 5 | ||
* `levels=1,3` include levels 1 and 3 | ||
* `levels=-3` include levels 1 to 3 | ||
* `levels=3-` include levels 3 to 6 | ||
|
||
* `html` generate HTML version of the TOC | ||
|
||
* `markdown` generate Markdown version of the TOC | ||
|
||
* `text` to only include the text of the heading | ||
|
||
* `formatted` to include text and inline formatting | ||
|
||
* `hierarchy` to render as hierarchical list in order of appearance in the document | ||
|
||
* `flat` to render as a flat list in order of appearance in the document | ||
|
||
* `reversed` to render as a flat list in order of appearance in the document | ||
|
||
* `sort-up` to render as a flat list sorted alphabetically by heading text only, no inlines | ||
|
||
* `sort-down` to render as a flat list sorted reversed alphabetically by heading text only, | ||
no inlines | ||
|
||
* `bullet` to use a bullet list for the TOC items | ||
|
||
* `numbered` to use a numbered list for TOC items | ||
|
||
where # is a digit specifying the highest level heading to use in the table of contents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.