Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add globalSlugs option #543

Merged
merged 6 commits into from
Jun 10, 2024
Merged

Conversation

dbolack-ab
Copy link
Contributor

Changes:

Adds globalSlugs parameter to the extension paramters. When set to false, the extension behaves as it historically has. If set to true, the slugger and headers list are not reset on each parse.

When set to true, the slugger and headers[] persist until the new resetheadings function is called.

Changes:

Adds globalSlugs parameter to the extension paramters. When set to false, the extension behaves as it historically has. If set to true, the slugger and headers list are not reset on each parse.

When set to true, the slugger and headers[] persist until the new `resetheadings` function is called.
@UziTech UziTech linked an issue Jun 6, 2024 that may be closed by this pull request
Copy link
Member

@UziTech UziTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests and docs to the README for this method

src/index.d.ts Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
`globalSlugs usage - Pre-Clearing.` Does not clear the headers before the test run, combining it with the results of the previous test. Runs two passes through marked.

`globalSlugs usage - Pre-Clearing.` Clears before running the test, only outputting parsing results from this test. Runs two passes through marked.

`globalSlugs usage - Pre and middle clearing.` Clears before and after the first pass. Runs two passes through marked.
@dbolack-ab
Copy link
Contributor Author

Can you add tests and docs to the README for this method

Let me know if these updates are adequate.

README.md Outdated Show resolved Hide resolved
src/index.d.ts Outdated Show resolved Hide resolved
dbolack-ab and others added 2 commits June 10, 2024 01:35
Co-authored-by: Tony Brix <tony@brix.ninja>
Co-authored-by: Tony Brix <tony@brix.ninja>
Copy link
Member

@UziTech UziTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sticking with this! 💯

@UziTech UziTech merged commit 41da687 into markedjs:main Jun 10, 2024
6 checks passed
@UziTech UziTech changed the title Introduces the notion of larger scale header uniqueness feat: add globalSlugs option Jun 10, 2024
github-actions bot pushed a commit that referenced this pull request Jun 10, 2024
# [3.2.0](v3.1.3...v3.2.0) (2024-06-10)

### Features

* add globalSlugs option ([#543](#543)) ([41da687](41da687))
Copy link
Contributor

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permit "global" GFM Headings
3 participants