diff options
| author | Konsta Hölttä | 2020-08-23 21:22:44 +0300 | 
|---|---|---|
| committer | Philipp A | 2020-09-07 00:28:39 +0200 | 
| commit | 4de128cf7924ad3c0c81dfc52701ace16b010749 (patch) | |
| tree | da2b4ac2ea440e8d9fe5424959349309093032c6 | |
| parent | 97d9c8f448045c4da802e1b436bbf709d2509ba5 (diff) | |
| download | rust-rst-4de128cf7924ad3c0c81dfc52701ace16b010749.tar.bz2 | |
Add html test for substs in literals
Text inside an inline or block literal that looks like a substitution
reference must still stay unmodified.
| -rw-r--r-- | renderer/src/html/tests.rs | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/renderer/src/html/tests.rs b/renderer/src/html/tests.rs index 26c9e72..afd2d24 100644 --- a/renderer/src/html/tests.rs +++ b/renderer/src/html/tests.rs @@ -90,6 +90,20 @@ A |subst|.  ", "<p>A text substitution.</p>");  } +#[test] +fn not_substitution_literal() { +	check_renders_to("\ +hello ``foo.map(|world| world + 42)`` + +.. |world| replace:: something different + +.. code:: + +   foo.map(|world| world + 42) +", "<p>hello <code>foo.map(|world| world + 42)</code></p> +<pre>foo.map(|world| world + 42)\n</pre>"); +} +  /*  #[test]  fn test_section_hierarchy() { | 
