remarkjs / react-markdown

Markdown component for React
https://remarkjs.github.io/react-markdown/
MIT License
12.4k stars 847 forks source link

Support for inapp links #809

Closed daniil00d closed 4 months ago

daniil00d commented 4 months ago

Initial checklist

Problem

When inputting a link formatted as [hello]({any_app}://something) or <{any_app}://something>, a link node with an empty href is created.

Solution

I'd like the library to support this case: we input a link to an application (installed on the current device), and upon clicking said link, the application is opened. An example being: click me

Alternatives

One potential solution could be to give the user more control over the transformation of links obtained from the text. This could be achieved, for example, by extending the transformLinkUri prop, where it would be possible to access the protocol, domain, pathname, query, etc.

ChristianMurphy commented 4 months ago

Welcome @daniil00d! 👋

They are supported, but disabled by default as they are insecure. You can set your own URL transform in the options https://github.com/remarkjs/react-markdown#options See https://github.com/remarkjs/react-markdown/issues/774 for some examples

github-actions[bot] commented 4 months ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.

github-actions[bot] commented 4 months ago

Hi! Thanks for taking the time to contribute!

Because we treat issues as our backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn’t an exact duplicate but is closely related.

Thanks, — bb

github-actions[bot] commented 4 months ago

Hi team! It seems this post is a duplicate, but hasn’t been marked as such. Please post a comment w/ Duplicate of #123(no final .) to do so. See GH docs for more info.

Thanks, — bb

ChristianMurphy commented 4 months ago

Duplicate of #774