Thanks for the feedback! It would be awesome if you could create a new GitHub issue on this so that it makes it easier to keep track of.
Just as you mentioned, there doesn't seem to be a definition for what correctly defines a spoiler tag in Lemmy, so it's a bit difficult to get all the edge cases right! I kept the parsing to be limited to what Lemmy UI produces when you press the spoiler tag (which adds a space after :::
). This is also non-standard markdown which makes it particularly more difficult to implement ๐
For reference, this is what Lemmy UI generates as a template:
spoiler
___