add linkify custom regex to excluding parenthesis in the end of link - #42
Open
makrusali wants to merge 1 commit into
Open
add linkify custom regex to excluding parenthesis in the end of link#42makrusali wants to merge 1 commit into
makrusali wants to merge 1 commit into
Conversation
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.
i added some push to the website for following issue #31
this https://handmade.network/), is a valid link as i check in here https://0mg.github.io/tools/uri/
but turns out github doesn't render '),' as part of the link
so i add custom config url regex for linkify,
i remove the
(and)from[-a-zA-Z0-9@:%_+.~#$!?&/=\(\);,'">\^{}\[\]`]and after that i add a conditionorif we find(or)it must be followed by[-a-zA-Z0-9@:%_+~#$!?&/=;'">\^{}\[\]`]excepting,and.to make(or)as a part of the link, otherwise notoriginal regex for linkify is (default from goldmark):
from: https://github.com/yuin/goldmark/blob/master/extension/linkify.go
and modified version is like this
the wasm build is error for me in
hmn\src\parsing\wasm\parsingmain.go:14undefined: parsing.ForumPreviewMarkdownso i replace it toPostPreviewMarkdownonly just to test and i din't commit them.sorry if my explanation sound confusing, i try my best to write this