microsoft / vscode-markdown-tm-grammar

VS Code built-in markdown extension's Textmate grammar
MIT License
63 stars 50 forks source link

Add support for tildes in attributes of fenced code block #127

Closed a-stewart closed 1 year ago

a-stewart commented 1 year ago

This fixes #126.

Fenced code blocks fail if there is a tilde (or backtick) in the attributes of a fenced codeblock.

For example, the following markdown highlights as expected.

```sh {higlight="content:/$foo"}
cd ~/$foo
```

But as soon as you add a tilde to the filepath, syntax highlighting stops working:

```sh {higlight="content:~/$foo"}
cd ~/$foo
```
a-stewart commented 1 year ago

Running the tests pulls in changes unrelated to this change, I think perhaps because the VS Code theme has changed the colours?

I've run the tests against main, and included that as a separate PR if that is preferred: https://github.com/microsoft/vscode-markdown-tm-grammar/pull/128

mjbvz commented 1 year ago

Thanks!