Packages icon indicating copy to clipboard operation
Packages copied to clipboard

[Markdown] Red highlight after "unclosed" *

Open rchl opened this issue 4 years ago • 1 comments

What happened?

ST shows red line in the following code:

## 0.27.11

- fix: json types cannot update in *.vue on editing

## 0.27.10

Screenshot:

Screenshot 2021-11-28 at 13 03 40

Looks like it's thinking that * is unclosed.

Possibly the solution could be to bail looking for matching * at the end of the line and treat it as a literal * then.

Failing example sourced from https://raw.githubusercontent.com/johnsoncodehk/volar/bd2a7bad02deb2e0b04156ca1b788e2cb6c934ce/CHANGELOG.md

rchl avatar Nov 28 '21 12:11 rchl

The described behavior is working as expected for an ST3 compatible syntax definition. The way to go is to escape the asterisk.

As emphasizes can span multiple lines a bailout at eol is no option.

A proper solution woul use branching to fail once the end of a paragraph/block is detected.

This issue might be addressed once https://github.com/SublimeText-Markdown/MarkdownEditing/tree/refactor-syntax has reached is final ST3 compatible milestone, which will be the point when it will be proposed to be merged back into this repo.

deathaxe avatar Nov 28 '21 13:11 deathaxe