-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ NEW: Add
inline_definitions
option (#187)
This option allows for `definition` token to be inserted into the token stream, at the point where the definition is located in the source text (in addition to the standard extraction to `env`). It is not currently part of the Markdown-It JS implementation, but is useful for cases where one wishes to capture a "loseless" syntax tree of the parsed Markdown (in conjunction with the `store_labels` option).
- Loading branch information
1 parent
448ea83
commit 99cde43
Showing
4 changed files
with
114 additions
and
1 deletion.
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
94 changes: 94 additions & 0 deletions
94
tests/test_port/test_references/test_inline_definitions.yml
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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
- attrs: null | ||
block: true | ||
children: null | ||
content: '' | ||
hidden: false | ||
info: '' | ||
level: 0 | ||
map: | ||
- 0 | ||
- 1 | ||
markup: '' | ||
meta: | ||
id: A | ||
label: a | ||
title: title | ||
url: url | ||
nesting: 0 | ||
tag: '' | ||
type: definition | ||
- attrs: null | ||
block: true | ||
children: null | ||
content: '' | ||
hidden: false | ||
info: '' | ||
level: 0 | ||
map: | ||
- 1 | ||
- 2 | ||
markup: '-' | ||
meta: {} | ||
nesting: 1 | ||
tag: ul | ||
type: bullet_list_open | ||
- attrs: null | ||
block: true | ||
children: null | ||
content: '' | ||
hidden: false | ||
info: '' | ||
level: 1 | ||
map: | ||
- 1 | ||
- 2 | ||
markup: '-' | ||
meta: {} | ||
nesting: 1 | ||
tag: li | ||
type: list_item_open | ||
- attrs: null | ||
block: true | ||
children: null | ||
content: '' | ||
hidden: false | ||
info: '' | ||
level: 2 | ||
map: | ||
- 1 | ||
- 2 | ||
markup: '' | ||
meta: | ||
id: A | ||
label: a | ||
title: title | ||
url: url | ||
nesting: 0 | ||
tag: '' | ||
type: definition | ||
- attrs: null | ||
block: true | ||
children: null | ||
content: '' | ||
hidden: false | ||
info: '' | ||
level: 1 | ||
map: null | ||
markup: '-' | ||
meta: {} | ||
nesting: -1 | ||
tag: li | ||
type: list_item_close | ||
- attrs: null | ||
block: true | ||
children: null | ||
content: '' | ||
hidden: false | ||
info: '' | ||
level: 0 | ||
map: null | ||
markup: '-' | ||
meta: {} | ||
nesting: -1 | ||
tag: ul | ||
type: bullet_list_close |
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