shortcode-tree
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -18,3 +18,3 @@ "use strict"; | ||
var openingBlockMatch = /\[(.*?)\]/g.exec(input); | ||
var openingBlockMatch = /\[[^\/](.*?)\]/g.exec(input); | ||
@@ -21,0 +21,0 @@ if (!openingBlockMatch) { |
{ | ||
"name": "shortcode-tree", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "Parser library for reading short codes (BB codes) into a tree structure", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -113,2 +113,10 @@ let ShortcodeParser = require('../src').ShortcodeParser; | ||
it('throws an error for malformatted input: just a closing tag', function () { | ||
let testInput = `[/closer]`; | ||
expect(function () { | ||
ShortcodeParser.parseShortcode(testInput, options) | ||
}).to.throw("opening tag"); | ||
}); | ||
it('does not error / performs best guess for malformatted input: invalid/missing closing tag', function () { | ||
@@ -115,0 +123,0 @@ let testInput = `we [open] but no [/close]`; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68158
1195