Help debugging Sequence Diagram plugin

Looks like your problem is your regular expression in your whitelist was a global. Global regular expressions will retain state on repeated calls based on the last index, so every second call was failing.

An easy fix is to change it to:

Discourse.Markdown.whiteListTag('div', 'class', 'discourse-sequence-diagram');