feat: Initial clean release of CHM
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
这个提交包含在:
@@ -0,0 +1,59 @@
|
||||
// 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'), '\\$&');
|
||||
}
|
||||
|
||||
function replaceRegexDiacritics(regexString) {
|
||||
if (!regexString) return '';
|
||||
|
||||
const diacriticReplacements = {
|
||||
a: '[aàáâãäåāą]',
|
||||
A: '[AÀÁÂÃÄÅĀĄ]',
|
||||
c: '[cçćč]',
|
||||
C: '[CÇĆČ]',
|
||||
d: '[dđď]',
|
||||
D: '[DĐĎ]',
|
||||
e: '[eèéêëěēę]',
|
||||
E: '[EÈÉÊËĚĒĘ]',
|
||||
i: '[iìíîïī]',
|
||||
I: '[IÌÍÎÏĪ]',
|
||||
l: '[lł]',
|
||||
L: '[LŁ]',
|
||||
n: '[nñňń]',
|
||||
N: '[NÑŇŃ]',
|
||||
o: '[oòóôõöøō]',
|
||||
O: '[OÒÓÔÕÖØŌ]',
|
||||
r: '[rř]',
|
||||
R: '[RŘ]',
|
||||
s: '[sšś]',
|
||||
S: '[SŠŚ]',
|
||||
t: '[tť]',
|
||||
T: '[TŤ]',
|
||||
u: '[uùúûüůū]',
|
||||
U: '[UÙÚÛÜŮŪ]',
|
||||
y: '[yÿý]',
|
||||
Y: '[YŸÝ]',
|
||||
z: '[zžżź]',
|
||||
Z: '[ZŽŻŹ]',
|
||||
};
|
||||
|
||||
let output = '';
|
||||
for (let i = 0; i < regexString.length; i++) {
|
||||
const c = regexString[i];
|
||||
const r = diacriticReplacements[c];
|
||||
if (r) {
|
||||
output += r;
|
||||
} else {
|
||||
output += c;
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
if (typeof module !== 'undefined') {
|
||||
module.exports = { pregQuote, replaceRegexDiacritics };
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户