@tiptap/suggestion
Advanced tools
Comparing version 2.0.0-beta.86 to 2.0.0-beta.87
@@ -7,10 +7,7 @@ 'use strict'; | ||
var prosemirrorView = require('prosemirror-view'); | ||
var core = require('@tiptap/core'); | ||
function findSuggestionMatch(config) { | ||
const { char, allowSpaces, prefixSpace, startOfLine, $position, } = config; | ||
// Matching expressions used for later | ||
const escapedChar = char | ||
.split('') | ||
.map(c => `\\${c}`) | ||
.join(''); | ||
const escapedChar = core.escapeForRegEx(char); | ||
const suffix = new RegExp(`\\s${escapedChar}$`); | ||
@@ -17,0 +14,0 @@ const prefix = startOfLine ? '^' : ''; |
import { PluginKey, Plugin } from 'prosemirror-state'; | ||
import { DecorationSet, Decoration } from 'prosemirror-view'; | ||
import { escapeForRegEx } from '@tiptap/core'; | ||
function findSuggestionMatch(config) { | ||
const { char, allowSpaces, prefixSpace, startOfLine, $position, } = config; | ||
// Matching expressions used for later | ||
const escapedChar = char | ||
.split('') | ||
.map(c => `\\${c}`) | ||
.join(''); | ||
const escapedChar = escapeForRegEx(char); | ||
const suffix = new RegExp(`\\s${escapedChar}$`); | ||
@@ -12,0 +9,0 @@ const prefix = startOfLine ? '^' : ''; |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('prosemirror-state'), require('prosemirror-view')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'prosemirror-state', 'prosemirror-view'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/suggestion"] = {}, global.prosemirrorState, global.prosemirrorView)); | ||
})(this, (function (exports, prosemirrorState, prosemirrorView) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('prosemirror-state'), require('prosemirror-view'), require('@tiptap/core')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'prosemirror-state', 'prosemirror-view', '@tiptap/core'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/suggestion"] = {}, global.prosemirrorState, global.prosemirrorView, global.core)); | ||
})(this, (function (exports, prosemirrorState, prosemirrorView, core) { 'use strict'; | ||
function findSuggestionMatch(config) { | ||
const { char, allowSpaces, prefixSpace, startOfLine, $position, } = config; | ||
// Matching expressions used for later | ||
const escapedChar = char | ||
.split('') | ||
.map(c => `\\${c}`) | ||
.join(''); | ||
const escapedChar = core.escapeForRegEx(char); | ||
const suffix = new RegExp(`\\s${escapedChar}$`); | ||
@@ -15,0 +11,0 @@ const prefix = startOfLine ? '^' : ''; |
{ | ||
"name": "@tiptap/suggestion", | ||
"description": "suggestion plugin for tiptap", | ||
"version": "2.0.0-beta.86", | ||
"version": "2.0.0-beta.87", | ||
"homepage": "https://tiptap.dev", | ||
@@ -36,3 +36,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "e550d3c69e06a1fb153c3faf17ab78c3081ae61b" | ||
"gitHead": "d71c27fe99e34d1906b4f094554beb86fc7287e1" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Range } from '@tiptap/core' | ||
import { Range, escapeForRegEx } from '@tiptap/core' | ||
import { ResolvedPos } from 'prosemirror-model' | ||
@@ -27,7 +27,3 @@ | ||
// Matching expressions used for later | ||
const escapedChar = char | ||
.split('') | ||
.map(c => `\\${c}`) | ||
.join('') | ||
const escapedChar = escapeForRegEx(char) | ||
const suffix = new RegExp(`\\s${escapedChar}$`) | ||
@@ -34,0 +30,0 @@ const prefix = startOfLine ? '^' : '' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
97440
1032