From aa4d435a67ba459296a8776096e7d7aa926e8a51 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 27 May 2012 09:24:37 +0100 Subject: [PATCH] Fixed wikitext rule for CSS classes to not erroneously match `{{{` --- core/modules/parsers/newwikitextparser/blockrules/class.js | 4 ++-- tw5.com/tiddlers/TestingNewWikiText.tid | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/modules/parsers/newwikitextparser/blockrules/class.js b/core/modules/parsers/newwikitextparser/blockrules/class.js index 9bb682729..b387cf8ee 100644 --- a/core/modules/parsers/newwikitextparser/blockrules/class.js +++ b/core/modules/parsers/newwikitextparser/blockrules/class.js @@ -16,11 +16,11 @@ exports.name = "class"; exports.blockParser = true; -exports.regExpString = "\\{\\{(?:[^\\{\\r\\n]*)\\{$"; +exports.regExpString = "\\{\\{(?:[^\\{\\r\\n]+)\\{$"; exports.parse = function(match) { var tree = [], - reStart = /\{\{([^\{\r\n]*){(?:\r?\n)?/mg, + reStart = /\{\{([^\{\r\n]+){(?:\r?\n)?/mg, reEnd = /(\}\}\}$(?:\r?\n)?)/mg, endMatch; reStart.lastIndex = this.pos; diff --git a/tw5.com/tiddlers/TestingNewWikiText.tid b/tw5.com/tiddlers/TestingNewWikiText.tid index 1cade5ec6..c9f9bfa0f 100644 --- a/tw5.com/tiddlers/TestingNewWikiText.tid +++ b/tw5.com/tiddlers/TestingNewWikiText.tid @@ -9,6 +9,10 @@ One two three four. With a link to HelloThere. And a link to TiddlyWiki and Tidd Here's a paragraph with an embedded macro <> and that was it. +{{{ +This will be mono +}}} + Here is a macro <> ! This is a new heading