Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    Wow, thank you, and that works beautifully. It's rather amusing how the \end{script} delimiter changes highlighting when entering incomplete Lua code (such as when it's looking for an end to finish and un-closed loop, but I think that's to be expected. At least it doesn't bleed all over the rest of the file like my previous attempts. Commented Dec 19, 2019 at 4:49
  • 2
    I hope you don't mind I credited you as the author of the code in the commit where I added this. If you don't wish for that I'm happy to overwrite it without the credit. Commented Dec 19, 2019 at 5:03
  • 1
    Glad this worked for you! You can try changing the end tag to end="\\end{script}"me=s-1 (change match eend to one character before the start of the regex), in which case the \\end{script} will be outside the region and might be a lot more stable... (Let me know if that helps, I can update the answer to include that too!) Commented Dec 19, 2019 at 5:04
  • Ah you're the author of the plug-in! 😁 I didn't realize that... Yeah that's totally fine, thanks a lot for the attribution! Really happy to have helped here. Commented Dec 19, 2019 at 5:06
  • 1
    I just tried and it is indeed much more stable. Thanks for the trick. Commented Dec 19, 2019 at 5:11