Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari fails #3847

Closed
1 task done
BradleyHill opened this issue Nov 16, 2022 · 3 comments · Fixed by #3848
Closed
1 task done

Safari fails #3847

BradleyHill opened this issue Nov 16, 2022 · 3 comments · Fixed by #3848

Comments

@BradleyHill
Copy link

Kind of Issue

Runtime - command-line tools, Crash / Error

Tool or Library

cspell-trie

Version

6.5.0

Supporting Library

Other

OS

ALL

OS Version

Safari browser

Description

Seems importExportV4 added look ahead regex linesX.split(/(?<=\n)/) which cripples safari immediately.

Console dump: SyntaxError: Invalid regular expression: invalid group specifier name

Steps to Reproduce

Just upgrade cspell to 6.5 or above and run any app in safari. Boom.

Simulate with just this: console.log('safari'.split(/(?<=\n)/));

Expected Behavior

No response

Additional Information

Looks like cspell-trie-lib/dist/lib/io/importExportV4.js has:

function importTrie(linesX) {
linesX = typeof linesX === 'string' ? linesX.split(/(?<=\n)/) : linesX;

which cripples

cspell.json

No response

cspell.config.yaml

No response

Example Repository

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Jason3S
Copy link
Collaborator

Jason3S commented Nov 17, 2022

@BradleyHill,

Is it possible to give me context on how this library is used.

The longer term intent is to make cspell-dictionary the way to create and use dictionaries.

Interface

Create Methods:

@BradleyHill
Copy link
Author

@Jason3S It is a spell check for text elements in a sort of page creation browser based tool. Think this was just rather unique in that the look behind regex just crippled Safari. Blows on load. Not sure if this is issue with safari or the regex. Chrome is the preponderance of our users. We've found safari to be the unruly child but there are too many apple myrmidons to ignore.

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants