Closed steegness closed 7 years ago
Hi, I never experienced the issue, but I usually use my StrapDown.js on a pure-Markdown page so I'm not surprised that it could need such a trick for a more general setting.
I will test and then merge your suggestion, thanks.
The change as written (changing the document.body.replaceChild) works: once. That's because of this line:
var markdownEl = document.getElementsByTagName("xmp")[0] || (document.getElementsByTagName("pre")[0] || document.getElementsByTagName("textarea")[0]);
Likely a separate issue, but something I noticed while I was testing things out.
Hi again, Thanks for your suggestion, the change has been done here, 04124c0.
As referenced here in the original project, it seems as though the xmp or textarea currently MUST be a direct child of the body tag to work. A change to the replaceChild() calls seems as though it can fix this.