Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

Syntax highlighting doesn't handle fenced code blocks correctly #1176

Open
DanTup opened this issue Dec 3, 2018 · 1 comment
Open

Syntax highlighting doesn't handle fenced code blocks correctly #1176

DanTup opened this issue Dec 3, 2018 · 1 comment

Comments

@DanTup
Copy link
Contributor

DanTup commented Dec 3, 2018

This screenshot is from VS Code, but since I took the TextMate grammar from here, I guess it has the same issue:

Code

My fix for VS Code is at Dart-Code/Dart-Code#1326 and changes from the left to the right (note: I'm no expert in TM grammar so it may not be the best way, but it seems to work):

screen shot 2018-12-03 at 12 09 59 pm
screen shot 2018-12-03 at 12 10 40 pm

@DanTup
Copy link
Contributor Author

DanTup commented Mar 25, 2019

FYI - there was a bug in Dart Code's implementation of this:

"patterns": [
	{
		"begin": "///",
		"while": "///",
		"patterns": [
			{
				"include": "#dartdoc"
			}
		],
		"name": "comment.block.documentation.dart"
	}
]

The while pattern should be ^/// so that it doesn't include the whole of the next line if it contains /// when it's not at the start (see Dart-Code/Dart-Code#1554). It's fixed now in Dart Code's master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants