Skip to content
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

Options for URL matching and output #9

Open
sebbASF opened this issue Aug 24, 2019 · 2 comments
Open

Options for URL matching and output #9

sebbASF opened this issue Aug 24, 2019 · 2 comments

Comments

@sebbASF
Copy link

sebbASF commented Aug 24, 2019

The code considers the href and text to be the same for both these cases:

(A) <a href="https://a.b.c">a.b.c</a>
(B) <a href="http://a.b.c">a.b.c</a>

Both are rendered as 'a.b.c'

However it does not consider the following to be the same:

(C) <a href="http://a.b.c/">a.b.c</a>

So the output is rendered as '[a.b.c](http://a.b.c/)'

I think the href in (A) should not be considered equal, whereas I expect (C) to render as 'a.b.c'.

For some circumstances, it might also be useful to keep the '[text](url)' format regardless of equality.

Maybe it would be useful to do the URL matching in a separate function that could optionally be provided by callers?

Additionally perhaps allow the output format to be varied, e.g. as
'text <url>' which seems to be common in text portions of mime mails.

@soundasleep
Copy link
Owner

Hello! I think your comment lost some of the formatting, so I can't see what the problem is - can you please repost (you may have to use backticks to force GitHub/Markdown to not format the code)? Thank you!

@sebbASF
Copy link
Author

sebbASF commented Aug 27, 2019

Oops, edited original post. Hope that is clear now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants