Socket
Socket
Sign inDemoInstall

shortcode-tree

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shortcode-tree - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

2

dist/shortcode-parser.js

@@ -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]`;

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc