micro-editor / micro-editor/micro
Crystal regex syntax highlighing breaks when `#{var}` is used
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Description of the problem or steps to reproduce
While writing Crystal code, attempting to use #{var} to insert a value into a regex expression causes the syntax highlighting to treat the rest of the line as a comment.
This notably doesn't occur when the same thing is done in a string.
Specifications
Commit hash: Micro 2.0.13 from the official Gentoo repositories. (-version displays no hash)
OS: Gentoo Linux
Terminal: Wezterm
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Reproduce the issue in Micro 2.0.13 with Crystal regex interpolation using #{var}, comparing it with the equivalent string interpolation. Then locate the Crystal syntax-highlighting definition or entry point and trace how the regex is parsed. Done means the remainder of a regex line is no longer highlighted as a comment while string interpolation continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100