-
In the current Rust implementation when I try to call to_mdast on a markdown like this :
It generates the correct tree but the url value is being escaped like that while in the JS implementation when I provide it with the same markdown the url value isn't being escaped and instead it generates For my use case it's quite tricky when trying to match for a control char in the string with Rust, while in JS it's relatively simple just a matter of checking whether the character is in a specific range. Maybe there's a decision here that I don't quite get ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hey hey! It might be that you are writing tests for both projects? Can you show the code for these things? |
Beta Was this translation helpful? Give feedback.
The
\f
in the JavaScript string you show is an escape. Just like\n
. Or\t
. It is a form feed character:'\f'.charCodeAt(0).toString(16)
isc
.If you type
f
or\\f
in Rust, it’s something else. It could definitely be that\f
isn‘t allowed to be typed literally in Rust, I don’t know from the top of my head.So it’s not the same as the JavaScript test case.
I believe your test case in Rust should be: