src/tests/subscript.rs
raw| 1 | use super::*; |
| 2 | |
| 3 | #[test] |
| 4 | fn subscript() { |
| 5 | html_opts!([extension.subscript], "H~2~O\n", "<p>H<sub>2</sub>O</p>\n",); |
| 6 | } |
| 7 | |
| 8 | #[test] |
| 9 | fn strikethrough_and_subscript() { |
| 10 | html_opts!( |
| 11 | [extension.subscript, extension.strikethrough], |
| 12 | "~~H~2~O~~\n", |
| 13 | "<p><del>H<sub>2</sub>O</del></p>\n", |
| 14 | ); |
| 15 | } |
| 16 | |
| 17 | #[test] |
| 18 | fn no_strikethrough_when_only_subscript() { |
| 19 | html_opts!( |
| 20 | [extension.subscript], |
| 21 | "~~H~2~O~~\n", |
| 22 | "<p>~~H<sub>2</sub>O~~</p>\n", |
| 23 | ); |
| 24 | } |