New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nodebb-plugin-link-mentions

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodebb-plugin-link-mentions - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "nodebb-plugin-link-mentions",
"version": "0.0.2",
"version": "0.0.3",
"description": "NodeBB plugin that allows adding custom mentions to preconfigured links by prepending '^' to their corresponding keywords",

@@ -5,0 +5,0 @@ "main": "library.js",

@@ -10,5 +10,15 @@ 'use strict';

let slugify;
let prevTerm = '';
let noMatch = false;
const strategy = {
match: new RegExp(`\\B\\${SYMBOL}([^\\s\\n]*)?$`),
match: new RegExp(`\\B\\${SYMBOL}(([^\\s\\n]\\s?)*)?$`),
search: function (term, callback) {
// Don't search on further key presses if there's no match already
if (term && term.startsWith(prevTerm) && noMatch) {
return callback([]);
}
noMatch = false;
prevTerm = term;
// Get composer metadata

@@ -26,2 +36,3 @@ const uuid = data.options.className && data.options.className.match(/dropdown-(.+?)\s/)[1];

noMatch = pairs.length < 1;
callback(pairs.sort((a, b) => a.toLocaleLowerCase() > b.toLocaleLowerCase()));

@@ -28,0 +39,0 @@ });

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