flying-sheep / rust-rst

a reStructuredText parser and renderer
https://crates.io/crates/rst
Apache License 2.0
98 stars 10 forks source link

Don’t parse literal content #20

Closed sooda closed 4 years ago

sooda commented 4 years ago

Text inside an inline or block literal that looks like a substitution reference must still stay unmodified.

This currently fails because the substitution is processed for the inline literal:

Diff < left / right > :
<"<p>hello <code>foo.map(something differentworld + 42)</code></p>\n<pre>foo.map(|world| world + 42)\n</pre>"
>"<p>hello <code>foo.map(|world| world + 42)</code></p>\n<pre>foo.map(|world| world + 42)\n</pre>"