Closed christianbundy closed 5 years ago
I'd suggest to inspect sources, because there are many possibilities for modifications. The most simple is to override default method
@puzrin Sorry, maybe I didn't edit quickly enough -- I'm using the normalize
method, but it seems like there's some interplay between match.text
and match.url
where modifying the text mangles the URL. I'd like to be able to set match.text = '%25'
and have that produce <a>%25</a>
rather than <a>%</a>
.
If you think there is some interplay, you could provide a minimal possible executable code sample, as proof of reproducible problem.
This package just search text bounds and add some meta, any post-processing magic is out of scope.
Thanks, I think this was just happening in link_open
in markdown-it -- I'll post-process after that step is done, thanks a lot!
I have a weird use-case where we link to
/%abc
and do not have URI-encoding. Here's whatmatch
looks like after normalization:Unfortunately
text
is being mangled and%f8
is being URI-decoded, whereas I'd like that to be a string literal. If we replace the%
with%25
then theurl
becomes mangled, and the%
is being URI-encoded as%25
as well. Is there a way to disable the codec behavior?To be clear, this is being rendered as:
When we fix the
text
property it seems to be affecting theurl
property, because then it comes out as:The desired behavior is:
Our code is: