use super::*; #[test] fn spoiler() { html_opts!( [extension.spoiler], "The ||dog dies at the end of Marley and Me||.\n", "
The dog dies at the end of Marley and Me.
\n", ); } #[test] fn spoiler_in_table() { html_opts!( [extension.table, extension.spoiler], "Text | Result\n--- | ---\n`||some clever text||` | ||some clever text||\n", concat!( "| Text | \n", "Result | \n", "
|---|---|
||some clever text|| | \n",
"some clever text | \n", "
|should not be spoiler|\n", "should be spoiler\n", "|should be spoiler surrounded by pipes|
\n" ), ); } #[test] fn mismatched_spoilers() { html_opts!( [extension.spoiler], "|||this is a spoiler with pipe in front||\n||this is not a spoiler|\n||this is a spoiler with pipe after|||", concat!( "|this is a spoiler with pipe in front\n", "||this is not a spoiler|\n", "this is a spoiler with pipe after|
\n" ), ); }