Allow dynamically generated header ids and classes#614
Merged
Martin1887 merged 28 commits intopulldown-cmark:masterfrom May 27, 2023
Merged
Allow dynamically generated header ids and classes#614Martin1887 merged 28 commits intopulldown-cmark:masterfrom
Martin1887 merged 28 commits intopulldown-cmark:masterfrom
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
Collaborator
|
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
Collaborator
|
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. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes the second (fragment identifier) and third (classes) fields of
Tag::Headingto be of typeCowStrfrom 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.