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

Document SanitizedAnchorName algorithm, copy implementation. #509

Merged
merged 1 commit into from Jan 20, 2019

Conversation

Projects
None yet
2 participants
@dmitshur
Copy link
Collaborator

dmitshur commented Dec 23, 2018

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.

Document SanitizedAnchorName algorithm, copy implementation.
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.

@dmitshur dmitshur requested a review from rtfb Dec 23, 2018

@dmitshur

This comment has been minimized.

Copy link
Collaborator

dmitshur commented Dec 23, 2018

/cc @SamWhited FYI, you might enjoy this change. :)

@rtfb rtfb referenced this pull request Dec 23, 2018

Open

Things to forward port from v1 to v2 #348

1 of 3 tasks complete
@dmitshur

This comment has been minimized.

Copy link
Collaborator

dmitshur commented Jan 19, 2019

Friendly ping @rtfb, do you have a chance to review this?

/cc @julieqiu I think this PR may fix the issue that you ran into.

@rtfb

rtfb approved these changes Jan 20, 2019

@rtfb

This comment has been minimized.

Copy link
Collaborator

rtfb commented Jan 20, 2019

Yep, looks good. Thanks, and sorry for the delay.

@dmitshur

This comment has been minimized.

Copy link
Collaborator

dmitshur commented Jan 20, 2019

No problem! Thanks, I'll merge it now.

@dmitshur dmitshur merged commit 919b1f5 into v2 Jan 20, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@dmitshur dmitshur deleted the v2-port-352 branch Jan 20, 2019

@dmitshur

This comment has been minimized.

Copy link
Collaborator

dmitshur commented Jan 20, 2019

Since this change drops a dependency, and many people like that, maybe we should make a new v2 tag. Perhaps v2.1.0? What do you think @rtfb?

@rtfb

This comment has been minimized.

Copy link
Collaborator

rtfb commented Jan 20, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment