Document SanitizedAnchorName algorithm, copy implementation.#509
Merged
Conversation
The goal of this change is to reduce number of non-standard library packages (repositories) that blackfriday imports (not counting imports used only for tests) from 1 to 0, and in turn, reduce the cost of importing blackfriday into other projects. Do so by documenting the algorithm of SanitizedAnchorName, and include a copy of the small function inside blackfriday itself. The same functionality continues to be available in the original location, github.com/shurcooL/sanitized_anchor_name.Create. It can be used by existing users and those that look for a small package, and don't need all of blackfriday functionality. Existing users of blackfriday can use the new SanitizedAnchorName function directly and avoid an extra package import. This change is a port of PR #352 from v1 into v2. Updates #348. Updates #350.
Collaborator
Author
|
/cc @SamWhited FYI, you might enjoy this change. :) |
4 tasks
Collaborator
Author
rtfb
approved these changes
Jan 20, 2019
Collaborator
|
Yep, looks good. Thanks, and sorry for the delay. |
Collaborator
Author
|
No problem! Thanks, I'll merge it now. |
Collaborator
Author
|
Since this change drops a dependency, and many people like that, maybe we should make a new v2 tag. Perhaps |
Collaborator
|
Yeah, makes sense. I also want to check how #515 works with broken reference tests, and if it pulls it off, we could merge that one as well. I'll try to do that in the coming days. |
This was referenced Mar 24, 2020
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.
The goal of this change is to reduce number of non-standard library packages (repositories) that blackfriday imports (not counting imports used only for tests) from 1 to 0, and in turn, reduce the cost of importing blackfriday into other projects.
Do so by documenting the algorithm of
SanitizedAnchorName, and include a copy of the small function inside blackfriday itself. The same functionality continues to be available in the original location,github.com/shurcooL/sanitized_anchor_name.Create. It can be used by existing users and those that look for a small package, and don't need all of blackfriday functionality. Existing users of blackfriday can use the newSanitizedAnchorNamefunction directly and avoid an extra package import.This change is a port of PR #352 from v1 into v2.
Updates #348.
Updates #350.