You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Chore: Refactor string-utils to TypeScript (#9869)
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
// Leave this file as JavaScript -- our current TypeScript configuration
|
||||
// generates code that tries to access modules/exports, which is incompatible
|
||||
// with browser environments.
|
||||
|
||||
function pregQuote(str, delimiter = '') {
|
||||
return (`${str}`).replace(new RegExp(`[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\${delimiter || ''}-]`, 'g'), '\\$&');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user