Closed ocavue closed 1 year ago
It seems that mdast-util-gfm-autolink-literal use mdast-util-find-and-replace to handle "www."
. I'm not sure if this this case is an expected limitation from mdast-util-find-and-replace
.
See https://github.com/remarkjs/remark-gfm/issues/16. This is currently impossible and expected. GH does this as a transform afterwards too.
I’m currently working on a markdown parser in a different language. There I did implement it as a sort of transform still “on the parser”, which means positional info is there. I am planning to at some point port these things back. But currently I think this is currently expected.
Thanks for your explanation.
Closing this for now. It’s currently expected. I will likely devise something in the future though!
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
Initial checklist
Affected packages and versions
mdast-util-gfm-autolink-literal@1.0.2
Link to runnable example
No response
Steps to reproduce
Run the following script:
This script will output the following content:
Expected behavior
Parsing links should return
text
andlink
tokens withposition
property.Actual behavior
Parsing
www.
didn't returnposition
property in thetext
token andlink
token.Affected runtime and version
node@16.17.0
Affected package manager and version
No response
Affected OS and version
No response
Build and bundle tools
No response