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!( "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
TextResult
||some clever text||some clever text
\n" ), ); } #[test] fn spoiler_regressions() { html_opts!( [extension.spoiler], "|should not be spoiler|\n||should be spoiler||\n|||should be spoiler surrounded by pipes|||", concat!( "

|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" ), ); }