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

@chatwoot/prosemirror-schema

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chatwoot/prosemirror-schema - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

2

package.json
{
"name": "@chatwoot/prosemirror-schema",
"version": "1.0.11",
"version": "1.0.12",
"description": "Schema setup for using prosemirror in chatwoot. Based on 👉 https://github.com/ProseMirror/prosemirror-example-setup/",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -9,4 +9,4 @@ /**

export const triggerCharacters = char => $position => {
const regexp = new RegExp(`(?:^)?${char}[^\\s${char}]*`, 'g');
export const triggerCharacters = (char, minChars = 0) => $position => {
const regexp = new RegExp(`(^|\\s)(${char}[^\\s${char}]{${minChars},})`, 'g');

@@ -22,13 +22,13 @@ const textFrom = $position.before();

while ((match = regexp.exec(text))) {
const prefix = match.input.slice(Math.max(0, match.index - 1), match.index);
if (!/^[\s\0]?$/.test(prefix)) {
// eslint-disable-next-line
continue;
}
const beforeChar = match[1]; // Will be empty at start of text, or a space in the middle
const fullMatch = match[2]; // Includes the trigger character and following text
const from = match.index + $position.start();
let to = from + match[0].length;
const from = match.index + $position.start() + beforeChar.length;
const to = from + fullMatch.length;
if (from < $position.pos && to >= $position.pos) {
return { range: { from, to }, text: match[0] };
const trimmedText = fullMatch
? fullMatch.slice(char.length).trim()
: ""; // Remove trigger char and trim
return { range: { from, to }, text: trimmedText };
}

@@ -35,0 +35,0 @@ }

Sorry, the diff of this file is too big to display

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