Fixed regexp for filtered transclusion

Previously we couldn't use filter expressions that included curly braces
print-window-tiddler
Jeremy Ruston 2013-01-21 17:24:47 +00:00
rodzic 7642f2182c
commit d3fefa8b16
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -26,7 +26,7 @@ exports.types = {block: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /\{\{\{([^\{\}\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}\}([^\}]*)\}(?:\.(\S+))?(?:\r?\n|$)/mg;
this.matchRegExp = /\{\{\{([^\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}\}([^\}]*)\}(?:\.(\S+))?(?:\r?\n|$)/mg;
};
exports.parse = function() {

Wyświetl plik

@ -26,7 +26,7 @@ exports.types = {inline: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /\{\{\{([^\{\}\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}\}([^\}]*)\}(?:\.(\S+))?/mg;
this.matchRegExp = /\{\{\{([^\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}\}([^\}]*)\}(?:\.(\S+))?/mg;
};
exports.parse = function() {