Skip to content

Commit 453f8ba

Browse files
committed
fix(desc-text): handle fuzzy email detection with non-ascii symbols
1 parent 8eea607 commit 453f8ba

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

config/vite.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,21 @@ import { mergeConfig } from 'vite'
1717

1818
/** @type {import('vite').UserConfig} */
1919
export const baseConfig = {
20-
plugins: [icons({ scale: 1 })],
20+
plugins: [
21+
icons({ scale: 1 }),
22+
{
23+
enforce: 'pre',
24+
name: 'sefirot:patch-linkify-it',
25+
transform(code, id) {
26+
if (id.includes('markdown-it')) {
27+
return code.replace(
28+
'const text_separators = "[><\uFF5C]"',
29+
'const text_separators = "[><\uFF00-\uFFEF]"' // https://www.fileformat.info/info/unicode/block/halfwidth_and_fullwidth_forms/index.htm
30+
)
31+
}
32+
}
33+
}
34+
],
2135

2236
resolve: {
2337
alias: { 'sefirot/': fileURLToPath(new URL('../lib/', import.meta.url)) },

0 commit comments

Comments
 (0)