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

Detect raw URLs #13

Open
Strider-Alex opened this issue Jul 3, 2023 · 3 comments
Open

Detect raw URLs #13

Strider-Alex opened this issue Jul 3, 2023 · 3 comments
Labels
wontfix This will not be worked on

Comments

@Strider-Alex
Copy link

The feature you want to get in MarkdownView
Detect raw URLs and make them clickable.

Describe that feature in detail
Currently raw URLs (e.g. https://google.com) are not clickable in MarkdownView.
I believe this feature is supported in https://github.com/gonzalezreal/swift-markdown-ui, but not this repo. It would be nice to support that.

@LiYanan2004
Copy link
Owner

LiYanan2004 commented Jul 3, 2023

Spent some time discovering this issue. I think your request is to add support for extended version of auto-link.

I put some breakpoints in gonzalezreal's work to find out how his package works. As a result, the cmark-gfw he used in the package natively support this behavior.

Unfortunately, my package is based on swift-markdown which relies on swift-cmark. Seems like it doesn't support this extended behavior.

It may possible to implement some extra logic to extract URLs from text, but it's big work and may become buggy.

I will open an issue to see if swift-markdown will support this extended behavior.

You can check out this test webpage. The official CommonMark does not include this syntax.

The good news is <https://google.com> works.

@LiYanan2004 LiYanan2004 added the wontfix This will not be worked on label Jul 3, 2023
@LiYanan2004
Copy link
Owner

Opened an issue: swiftlang/swift-markdown#134

If that becomes available, MarkdownView will support it immediately.

@LiYanan2004
Copy link
Owner

By far, it's still works as I promised:

Thanks to apple/swift-markdown, it can fully compliant with the CommonMark Spec.

In gonzalezreal's package, he says:

...
It is compatible with the GitHub Flavored Markdown Spec
...

Just Okay 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants