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
Allow dynamically generated header ids and classes #614
Allow dynamically generated header ids and classes #614
Conversation
Changes the second (fragment identifier) and third (classes) fields of `Tag::Heading` to be of type `CowStr` from the previous `&str`, allowing dynamically generated values to be used in their place.
4e72207
to
01d0d6d
Compare
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.10.0 to 3.12.0. - [Release notes](https://github.com/fitzgen/bumpalo/releases) - [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md) - [Commits](fitzgen/bumpalo@3.10.0...3.12.0) --- updated-dependencies: - dependency-name: bumpalo dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
This feature is a breaking change because it modifies the `Heading` variant of the `Tag` enum with named fields and the new `attrs` field. Fixes: pulldown-cmark#634
YAML-style and pluses-delimited metadata blocks are supported, each one in a different `Options` flag. This is a breaking change because a new `Tag` enum variant is added. Fixes: pulldown-cmark#580
…attrs feat!: allow custom headings attributes with optional value. Fixes pulldown-cmark#634
…/bumpalo-3.12.0 dependencies: bump bumpalo from 3.10.0 to 3.12.0
feat!: metadata blocks. Fixes pulldown-cmark#580
Fix parser bug where link label gets broken by ] in code span
Make `html` and `escape` modules optional
…-lists Add task list with a list item's first paragraph
This pull request must be updated because the new custom attributes field of headings. Could you create a new commit fixing this, @SergioBenitez? If you cannot, I could update it. Anyway, benchmarks are needed before merging the pull request to check that the performance impact is not excessive. Thanks. |
fix: strikethrough can be intra-word
Performance is a bit lower in some benches, but consistency is important and the performance hurts are also reduced in use cases where headings ids, classes and attrs must be modified, so this can be merged. |
Changes the second (fragment identifier) and third (classes) fields of
Tag::Heading
to be of typeCowStr
from the previous&str
, allowing dynamically generated values to be used in their place.In my use of
pulldown-cmark
, I want to automatically generate heading IDs and have the markdown renderer emit them. This change makes that possible. Workarounds are possible, but maintaining the tree as close to the original source as possible is desired.