generated from diplodoc-platform/package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: register leaf blocks and containers separately
- Loading branch information
Showing
8 changed files
with
152 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
/* eslint-disable valid-jsdoc */ | ||
import type MarkdownIt from 'markdown-it'; | ||
|
||
import {RULE} from '../const'; | ||
|
||
/** Enable parsing of inline directives */ | ||
export function enableInlineDirectives(md: MarkdownIt): void { | ||
md.inline.ruler.enable(RULE.Inline, true); | ||
} | ||
|
||
/** Disable parsing of inline directives */ | ||
export function disableInlineDirectives(md: MarkdownIt): void { | ||
md.inline.ruler.disable(RULE.Inline, true); | ||
} | ||
|
||
/** Enable parsing of leaf block and container directives */ | ||
export function enableBlockDirectives(md: MarkdownIt): void { | ||
md.block.ruler.enable(RULE.Block, true); | ||
} | ||
|
||
/** Disable parsing of leaf block and container directives */ | ||
export function disableBlockDirectives(md: MarkdownIt): void { | ||
md.block.ruler.disable(RULE.Block, true); | ||
} |
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
Oops, something went wrong.