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

Hello, is there a way to add url higlight? #129

Open
OpenJarvisAI opened this issue Sep 29, 2023 · 13 comments
Open

Hello, is there a way to add url higlight? #129

OpenJarvisAI opened this issue Sep 29, 2023 · 13 comments

Comments

@OpenJarvisAI
Copy link

I mean pure url, not markdown xx url

@asjqkkkk
Copy link
Owner

Hi @OpenJarvisAI , can you provide a sample to descripbe the url?
such as

https://github.com/asjqkkkk/markdown_widget

// or

[url description](https://github.com/asjqkkkk/markdown_widget)

@OpenJarvisAI
Copy link
Author

Just www.baidu.com

this text can not be higlighted even set url config,

but http://www.baodu.com seems can

@asjqkkkk
Copy link
Owner

image

Hi @OpenJarvisAI , base on the current sample, the two urls are performing the same.

@OpenJarvisAI
Copy link
Author

@asjqkkkk that's weired, seems not work on my side.

image

this is weired.

am I ddi something wrong?

image

the behavior is very strange

@asjqkkkk
Copy link
Owner

asjqkkkk commented Oct 5, 2023

Hi @OpenJarvisAI, could you please provider a minimal sample code with the sample data
I think the parsing problem may be caused by incorrect usage or data source issues.

@OpenJarvisAI
Copy link
Author

好的,这是几个网址:

  1. 百度:www.baidu.com
  2. 腾讯:www.tencent.com
  3. 阿里巴巴:www.alibaba.com
image

can not parse , and above is raw data source

@asjqkkkk
Copy link
Owner

asjqkkkk commented Oct 8, 2023

I know the reason, you need add space between the url and other symbol

such as this:
百度: www.baidu.com
腾讯: www.tencent.com
阿里巴巴: www.alibaba.com

no space it'll not working:

百度:www.baidu.com
腾讯:www.tencent.com
阿里巴巴:www.alibaba.com

@OpenJarvisAI
Copy link
Author

OpenJarvisAI commented Oct 8, 2023

@asjqkkkk Don't know it is standared or a bug, but if ww.baidu.com的回复恶搞。continues without a space, the whole text will detected as url. It can hard code handled in this situation?

@asjqkkkk
Copy link
Owner

asjqkkkk commented Oct 8, 2023

I think it's the markdown standard, you can have a look with: https://spec.commonmark.org/0.30/#links

@OpenJarvisAI
Copy link
Author

is there any way to make it process common usage which might url linke with normal text?

@asjqkkkk
Copy link
Owner

asjqkkkk commented Oct 8, 2023

Yes, but you need to write a InlineSyntax, such as AutolinkExtensionSyntax

@OpenJarvisAI
Copy link
Author

@asjqkkkk any example to do it?

@asjqkkkk
Copy link
Owner

@OpenJarvisAI

https://github.com/dart-lang/markdown/blob/master/lib/src/inline_syntaxes/autolink_extension_syntax.dart

you can also submit an issue to markdown

If this package can identify the content above as a link, this issue will be resolved.

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