Terminal local file links are mis-tokenized around CJK punctuation
@anthonykim1 is already working on this.
Since May 28, 2026.
Assessment
This issue has not been assessed yet.
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.121.0 (All Versions)
- OS Version: Windows 11 (All Platforms)
Steps to Reproduce:
-
Open a folder in VS Code and create a file:
mkdir -p src touch src/main.ts touch src/utils.ts touch src/view.ts touch src/a.ts touch src/b.ts touch '《论文》.docx' -
In the integrated terminal, print localized output that includes paths next to CJK sentence/separator punctuation:
printf '%s\n' \ 'ASCII baseline: file: src/main.ts' \ 'CJK fullwidth colon before path: 请打开文件:src/main.ts。' \ 'CJK comma/full stop: 問題在:src/utils.ts,建議檢查。' \ 'CJK list separator: 関連ファイル:src/a.ts、src/b.ts。' \ 'CJK exclamation/question: 请检查:src/view.ts!是否存在:src/utils.ts?' \ 'CJK punctuation in filename: 请打开:《论文》.docx。' -
Hold Ctrl/Cmd and hover or click the file path portions in each line.
Actual:
- The ASCII baseline,
file: src/main.ts, is detected as a local file link. - Paths next to CJK sentence/separator punctuation appear to be mis-tokenized as candidates that include surrounding text or punctuation, causing local file validation to fail:
src/main.tsis effectively tokenized as请打开文件:src/main.ts。src/utils.tsis effectively tokenized as問題在:src/utils.ts,建議檢查。src/a.tsandsrc/b.tsshould be two separate links, but the text is effectively tokenized as関連ファイル:src/a.ts、src/b.ts。src/view.tsandsrc/utils.tsshould be two separate links, but the text is effectively tokenized as请检查:src/view.ts!是否存在:src/utils.ts?《论文》.docxis effectively tokenized as请打开:《论文》.docx。
Expected:
- The local file link text should be the path itself, without surrounding natural-language text or CJK sentence/separator punctuation:
请打开文件:src/main.ts。should linksrc/main.ts問題在:src/utils.ts,建議檢查。should linksrc/utils.ts関連ファイル:src/a.ts、src/b.ts。should produce two links:src/a.tsandsrc/b.ts请检查:src/view.ts!是否存在:src/utils.ts?should produce two links:src/view.tsandsrc/utils.ts
- Bracket-like CJK punctuation such as
《》is more likely to be part of an actual file name, so it should be preserved when it is inside the path. This is different from CJK sentence/separator punctuation, which appears around or between paths in these examples.请打开:《论文》.docx。should link《论文》.docx
Local file links should still work when paths are surrounded by common CJK sentence/separator punctuation.
These are common shapes in localized CJK terminal output where punctuation is used as a label separator, trailing sentence punctuation, or list separator. This is also common in natural language output from tools and AI coding assistants.
Notes:
- I could not find a setting that works around this.
terminal.integrated.wordSeparatorsis documented and wired up for double-click word selection and fallback word/search link detection, while terminal local file links are parsed separately by the local file link parser. - This is specific to terminal local file link parsing. URL link detection does not have the same issue with these CJK punctuation boundaries, and already has explicit handling for several CJK punctuation characters as link terminators. Local file link parsing appears to have a smaller hardcoded delimiter set.
- Terminal local file link detection is already heuristic and optimizes for likely clickable paths rather than all syntactically valid file names. ASCII punctuation such as
:and;is already treated as separators even though some of these characters may be valid in file names on some platforms. - A reasonable scope would be CJK sentence/separator punctuation such as
,/。/:/;/!/?/、, which commonly appears around or between paths in localized and natural-language terminal output. Bracket-like CJK punctuation such as【】,《》,「」, and()is more likely to be part of actual file or directory names, so it should be preserved when it appears inside the path rather than treated as the same kind of delimiter.
🙋 I can work on a PR for this if the proposed scope sounds reasonable.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·