From 3d5017db05aff6ffa575be898a593e0e1b318613 Mon Sep 17 00:00:00 2001 From: Bartosz Antosik Date: Fri, 24 Nov 2017 11:12:23 +0100 Subject: [PATCH] Regression fixed (#93) --- README.md | 2 +- lib/parser.js | 4 ++-- src/spellright.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bde307c..bf3b74e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ * Supports use of multiple workspace plaintext file dictionaries which may be used for specialized vocabularies like **medical terms**, **trademark names** etc. * Spelling **multiple languages in one document** using In-Document commands to switch between languages. * **Case sensitive** which means that it will distinguish between *english* and *English*, *french* and *French* and is critical in some languages e.g. German. -* Spells **short words** and **abbreviations** (*I*, *I'm*, *i.e.*, *etc.*) +* Spells **short words** and **abbreviations** (*I*, *I'm*, *I'll*, *i.e.*, *etc.*) * Spells **CamelCase**, **snake_case** and **digit2inside** compound phrases respecting Unicode capital/small letters distinction (e.g.: *SuperŚlimak* is spelled as *Super* *Ślimak*) and capital letter adhesion (e.g.: *HTMLTest* is spelled as *HTML* *Test*). * Unobtrusive **GUI**/**command** interface for switching spelling dictionary (language) and turning spelling ON/OFF for particular document class. * **In-Document commands** allow to switch spelling **ON** or **OFF** despite global settings and **change spelling language** multiple times within the document. diff --git a/lib/parser.js b/lib/parser.js index 6cb3545..9ba976f 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -7,8 +7,8 @@ const vscode = require('vscode'); -global.LEXEM_BUILD = /[^\s,!\\?\*\/:\[\]\(\)\{\}\"\`\'\+\<\>\;\=\#\$\|\~]/; -global.LEXEM_SPELL = /[\s,!\\?\*\/:\[\]\(\)\{\}\"\`\'\+\<\>\;\=\#\$\|\~]/; +global.LEXEM_BUILD = /[^\s,!\\?\*\/:\[\]\(\)\{\}\"\`\+\<\>\;\=\#\$\|\~]/; +global.LEXEM_SPELL = /[\s,!\\?\*\/:\[\]\(\)\{\}\"\`\+\<\>\;\=\#\$\|\~]/; // ----------------------------------------------------------------------------- // ## In-Document command format: diff --git a/src/spellright.js b/src/spellright.js index 0198ba5..cc9c801 100644 --- a/src/spellright.js +++ b/src/spellright.js @@ -479,7 +479,7 @@ var SpellRight = (function () { // Here split some special cases like: period (`terminal.integrated`), // digit (`good2know`), dash (`wp-admin`) etc. Other consequence should // be that these words are spelled both as split and as the whole. - var rother = XRegExp('([^\.0-9\-]+)'); + var rother = XRegExp('([^\.0-9\-\']+)'); var rsep = /[\.0-9\-]/; var parts = [];