shortcode-tree
Advanced tools
Comparing version 1.4.5 to 1.4.6
@@ -20,3 +20,3 @@ 'use strict'; | ||
// Worse yet, in the case of malformatted shortcodes, this won't work reliably at all. That's a TODO: Figure out how to deal with malformatted input elegantly | ||
var regex = /\[(.*)\]/g; | ||
var regex = /\[([\s\S]*)\]/gm; | ||
@@ -23,0 +23,0 @@ var match = void 0; |
{ | ||
"name": "shortcode-tree", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"description": "Parser library for reading short codes (BB codes) into a tree structure", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -108,2 +108,12 @@ let ShortcodeExtractor = require('../src').ShortcodeExtractor; | ||
}); | ||
it('extracts tags correctly when newlines are at play', function () { | ||
let testInput = "[row]\n[col]text[/col]\n[/row]"; | ||
let actualOutput = ShortcodeExtractor.extractShortcodes(testInput) || null; | ||
let expectedOutput = [ | ||
new Shortcode("row", "\n[col]text[/col]\n", {}, false, "[row]\n[col]text[/col]\n[/row]", 0) | ||
]; | ||
expect(actualOutput).to.deep.equal(expectedOutput); | ||
}); | ||
}); |
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
69794
1219