meta-shortcodes
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -103,3 +103,8 @@ /* | ||
if(t.match("\\\\" + this.options.openPattern, true)){ | ||
t.toBuffer(this.options.openPattern.replace(/\\/g, "")); | ||
} | ||
if(!t.match(this.options.openPattern + "(?!\\/)", true)){ | ||
t.flushBuffer(); | ||
t.flushRest(); | ||
@@ -106,0 +111,0 @@ return false; |
{ | ||
"name": "meta-shortcodes", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Shortcode parser with support of arguments and attributes.", | ||
@@ -5,0 +5,0 @@ "main": "lib/parser.js", |
@@ -279,4 +279,16 @@ /* | ||
it("should ignore shortcode with escaped opening pattern", function(){ | ||
var parser = ShortcodeParser(); | ||
parser.add("test", function(opts, content){ | ||
return "OK"; | ||
}); | ||
parser.parse("Some \\[test/] should be ignored.").should.eql("Some [test/] should be ignored."); | ||
}); | ||
}); | ||
}); |
28475
784