mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-10 02:38:06 +00:00
Add support for named end markers for procedures, functions and widgets
This commit is contained in:
@@ -53,7 +53,7 @@ exports.parse = function() {
|
||||
var reEnd;
|
||||
if(this.match[5]) {
|
||||
// If so, the end of the body is marked with \end
|
||||
reEnd = /(\r?\n\\end[^\S\n\r]*(?:$|\r?\n))/mg;
|
||||
reEnd = new RegExp("(\\r?\\n\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
||||
} else {
|
||||
// Otherwise, the end of the definition is marked by the end of the line
|
||||
reEnd = /($|\r?\n)/mg;
|
||||
|
||||
Reference in New Issue
Block a user