Add @it-service-npm/remark-heading-adjustment to list of plugins#1479
Add @it-service-npm/remark-heading-adjustment to list of plugins#1479sergey-s-betke wants to merge 5 commits intoremarkjs:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1479 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 138 138
=========================================
Hits 138 138 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I’m ok with adding > [!NOTE]
> This is an admonition.
> \[!TIP]
> This is an admonition.
> [!TIP]
> This is a regular blockquote.
[!TIP]: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alertsYields: Note This is an admonition. Tip This is an admonition.
|
Thank You. I'll change pull request.
Ok. I'll update my package for Your example. Thank You! |
This reverts commit 6a8dffd.
|
@remcohaszing, |
Initial checklist
Description of changes
Updated plugins list.
Added a new plugins:
@it-service-npm/remark-gfm-admonition extends Remark’s functionality,
enabling it to read GitHub admonitions from Markdown
and to write them back to Markdown files.
Also published:
@it-service-npm/micromark-extension-gfm-admonition@it-service-npm/mdast-util-gfm-admonition@it-service-npm/remark-heading-adjustment Remark plugin helps to adjust headings depth in markdown file.
When
processor.data().topHeadingDepthis specified, this plugin adjusts all headings so that the depth of the top heading aligns with the given value.This plugin can be used for dynamically change headings depth. Example: https://github.com/IT-Service-NPM/remark-include/blob/649937ef3eb87bc1b0f3bbe8e4a9a47509aba5fc/src/index.ts#L214C1-L226C1
The plugin also exports a preset called
remarkAdjustTopHeadingToH1. This preset includes theremarkHeadingsAdjustmentplugin with settings{topHeadingDepth: 1}.These are meant for use in .remarkrc files and help normalize the depth of the top-level heading.