micro-editor / micro-editor/micro

Vue syntax highlighting appears to be totally broken.

Open
#1,963 5 comments 0 reactions 0 assignees View on GitHub

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

When editing a .vue file syntax higlightin seems to be completely broken. A .vue file is broken up into three sections, one that holds HTML, one CSS, and one JS or TS. For some reason rather than highlighting each section individually it acts like some very anemic highlighter is applied to the entire file.

Only certain items are highlighted, seemingly at random, and even the ones that highlight with some regularity often don't.

For example, in this image highlighting is almost kinda working inside the HTML block, but this is as good as it gets. HTML is almost always the most colorful section, CSS and JS are pretty much always plain white.
image

Here is the only bit of color in a giant sea of colorless javascript.
image

On a whim I changed the order of the blocks in the .vue file so that it goes script > css > html and now highlighting almost works. The javascript looks mostly there and the CSS is fine, but the HTML is still spotty at best. However, this is not a solution as the block order kinda needs to be the way I had it before (html > css > js) for other reasons.

Commit hash: cfcb2e45
OS: Manjaro Linux
Terminal: Alacritty

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 in a .vue file using commit cfcb2e45, testing HTML, CSS, JavaScript, and TypeScript blocks in the reported orders. Compare highlighting when the blocks are reordered; done means each section is highlighted correctly regardless of block order.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, javascript, typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.