Through trial and errors, I’ve created regex for lemmy spoilers:
/:::\sspoiler\s+(?<title>.+)\n(?<body>[\s\S]+?)\n:::/g
You must log in or register to comment.
You need a
at the end to ensure the final
:::
is on a line by itself.For example:
::: spoiler Example Content ::: More content Additional content :::
is rendered as one big spoiler block:
Example
Content
::: More content
Additional content
even though it has a line starting with
:::
in the middle.