Socket
Socket
Sign inDemoInstall

shortcode-tree

Package Overview
Dependencies
0
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.5 to 1.4.6

2

dist/shortcode-extractor.js

@@ -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);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc