@github/text-expander-element
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -188,6 +188,6 @@ const ctrlBindings = !!navigator.userAgent.match(/Macintosh/); | ||
return; | ||
keyIndex = lastMatchPosition - 1; | ||
keyIndex = lastMatchPosition - key.length; | ||
} | ||
const charAfterKey = text[keyIndex + 1]; | ||
if (charAfterKey === ' ' && cursor >= keyIndex + 2) | ||
if (charAfterKey === ' ' && cursor >= keyIndex + key.length + 1) | ||
return; | ||
@@ -194,0 +194,0 @@ const newLineIndex = text.lastIndexOf('\n', cursor - 1); |
@@ -18,6 +18,6 @@ import Combobox from '@github/combobox-nav'; | ||
return; | ||
keyIndex = lastMatchPosition - 1; | ||
keyIndex = lastMatchPosition - key.length; | ||
} | ||
const charAfterKey = text[keyIndex + 1]; | ||
if (charAfterKey === ' ' && cursor >= keyIndex + 2) | ||
if (charAfterKey === ' ' && cursor >= keyIndex + key.length + 1) | ||
return; | ||
@@ -24,0 +24,0 @@ const newLineIndex = text.lastIndexOf('\n', cursor - 1); |
@@ -16,6 +16,6 @@ const boundary = /\s|\(|\[/; | ||
return; | ||
keyIndex = lastMatchPosition - 1; | ||
keyIndex = lastMatchPosition - key.length; | ||
} | ||
const charAfterKey = text[keyIndex + 1]; | ||
if (charAfterKey === ' ' && cursor >= keyIndex + 2) | ||
if (charAfterKey === ' ' && cursor >= keyIndex + key.length + 1) | ||
return; | ||
@@ -22,0 +22,0 @@ const newLineIndex = text.lastIndexOf('\n', cursor - 1); |
{ | ||
"name": "@github/text-expander-element", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Activates a suggestion menu to expand text snippets as you type.", | ||
@@ -13,3 +13,3 @@ "repository": "github/text-expander-element", | ||
"compile": "tsc", | ||
"lint": "github-lint", | ||
"lint": "eslint .", | ||
"prebuild": "npm run clean && npm run lint && npm run compile", | ||
@@ -37,14 +37,14 @@ "build": "rollup -c", | ||
"@github/prettier-config": "0.0.4", | ||
"chai": "^4.2.0", | ||
"eslint": "^6.6.0", | ||
"eslint-plugin-github": "^3.4.1", | ||
"karma": "^5.0.2", | ||
"chai": "^4.3.4", | ||
"eslint": "^7.24.0", | ||
"eslint-plugin-github": "^4.1.3", | ||
"karma": "^6.3.2", | ||
"karma-chai": "^0.1.0", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-mocha": "^2.0.0", | ||
"karma-mocha": "^2.0.1", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"mocha": "^7.1.2", | ||
"rollup": "^1.26.3", | ||
"mocha": "^8.3.2", | ||
"rollup": "^2.45.1", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"typescript": "^3.8.3" | ||
"typescript": "^4.2.4" | ||
}, | ||
@@ -51,0 +51,0 @@ "eslintIgnore": [ |
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
48281