You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched issues and couldn’t find anything (or linked relevant results below)
Problem
Hi,
I want to render urls which use file schema, pointing to local file system files, for example:
file:///etc/hosts
Since URI supports file schema (RFC: https://datatracker.ietf.org/doc/html/rfc8089) and browsers open such links just fine I think it's reasonable to add support for it to react-markdown.
Passing your own uriTransformer is a viable alternative. It’s in my opinion also better because it does not change the behavior for every user of react-markdown ever.
Initial checklist
Problem
Hi,
I want to render urls which use
file
schema, pointing to local file system files, for example:file:///etc/hosts
Since URI supports
file
schema (RFC: https://datatracker.ietf.org/doc/html/rfc8089) and browsers open such links just fine I think it's reasonable to add support for it to react-markdown.Thanks
Solution
I think just adding 'file' to the protocol list in https://github.com/remarkjs/react-markdown/blob/8.0.7/lib/uri-transformer.js will do it.
Alternatives
Can't think if anything more simple than adding 'file' to the protocols list.
The text was updated successfully, but these errors were encountered: