microsoft / microsoft/vscode-textmate

`\\G` matches unicode character 0xFFFF `￿`

Open
#232 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
678
Forks
135
Avg merge
1d 14h
Merged PRs (30d)
2

Description

create a grammar with a rule containing \\G

"match": "\\G",
"name": "invalid"

run the grammar on a file containing the unicode character 0xFFFF ￿

expected:
it doesn't match anything, as there are no \\G anchors available

actual:
it matches the unicode char 0xFFFF

image
abc￿def

the char does actually pop up in multiple files inside VSCode
so this is not a non-issue issue
image

caused by

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a TextMate grammar whose match is \\G and a file containing U+FFFF, then compare the actual match with the expected no-match behavior. Read the linked vscode-textmate issue 70 for the stated cause and trace the tokenizer or regex handling involved; done means U+FFFF is no longer matched by \\G while valid behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.