From 3d484ed1f140a93440a22a38eda8e5557d1079cd Mon Sep 17 00:00:00 2001 From: Nixinova Date: Sat, 27 Jun 2020 17:44:16 +1200 Subject: [PATCH] 1.2.3 - Update to 0.4.x NovaSheets syntax - Bug fixes --- .vscode/launch.json | 6 +----- changelog.md | 9 +++++++++ package.json | 2 +- readme.md | 4 ++-- syntaxes/novasheets.tmLanguage.json | 28 ++++++++++------------------ 5 files changed, 23 insertions(+), 26 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7bc18a4..dc3064b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,9 +1,5 @@ -// A launch configuration that launches the extension inside a new window -// Use IntelliSense to learn about possible attributes. -// Hover to view descriptions of existing attributes. -// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 { - "version": "0.2.0", + "version": "0.2.0", "configurations": [ { "name": "Extension", diff --git a/changelog.md b/changelog.md index 6646d39..60d1b8f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,14 @@ # Changelog +## 1.2.3 +- Changed syntax highlighting rules to always apply to `@var`, `@endvar`, and `@const` anywhere in a line +- Changed syntax highlighting of `@const` declarations to allow boolean values and to apply syntax highlighting to the value of the constant. +- Removed syntax highlighting for the removed front matter separator `---`. +- Removed syntax highlighting for invalid characters as it has too many false positives. +- Removed syntax highlighting for parameters names in built-in variables. +- Fixed syntax highlighting of block comments extending the boundary of the comment. +- Fixed empty arguments and empty parameters not being treated as valid. + ## 1.2.2 - Added syntax highlighting for `@const` and `@endvar` declarations. - Added syntax highlighting for logical and bitwise operations. diff --git a/package.json b/package.json index 59b2f78..73872b2 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Syntax highligher for NovaSheet files", "publisher": "Nixinova", "repository": "NovaSheets-vscode", - "version": "1.2.2", + "version": "1.2.3", "engines": { "vscode": "^1.45.0" }, diff --git a/readme.md b/readme.md index 594c706..06b0fce 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ -[![Latest version](https://img.shields.io/github/v/release/Nixinova/NovaSheets-vscode?label=latest&style=flat-square)](https://github.com/Nixinova/NovaSheets/releases) +[![Latest version](https://img.shields.io/github/v/release/Nixinova/NovaSheets-vscode?label=latest&style=flat-square)](https://github.com/Nixinova/NovaSheets-vscode/releases) [![Marketplace version](https://img.shields.io/visual-studio-marketplace/v/Nixinova.novasheets?label=marketplace&style=flat-square)](https://marketplace.visualstudio.com/items/Nixinova.novasheets) -[![Last updated](https://img.shields.io/github/release-date/Nixinova/NovaSheets-vscode?label=updated&style=flat-square)](https://github.com/Nixinova/NovaSheets/releases) +[![Last updated](https://img.shields.io/github/release-date/Nixinova/NovaSheets-vscode?label=updated&style=flat-square)](https://github.com/Nixinova/NovaSheets-vscode/releases) This is a [VSCode](https://github.com/microsoft/vscode) extension for [NovaSheets](https://github.com/Nixinova/NovaSheets). diff --git a/syntaxes/novasheets.tmLanguage.json b/syntaxes/novasheets.tmLanguage.json index 398c9a8..a27acf5 100644 --- a/syntaxes/novasheets.tmLanguage.json +++ b/syntaxes/novasheets.tmLanguage.json @@ -33,7 +33,7 @@ ], "repository": { "constant": { - "match": "^\\s*(@const)\\s+([A-Z_]+)\\s+([0-9]+)(\\s//.*)?$", + "match": "(@const)(?:(\\s+[A-Z_]+)(\\s+(?:[0-9]+|true|false)))?", "captures": { "1": { "name": "keyword.variable.declarator" @@ -41,8 +41,8 @@ "2": { "name": "support.type.constant.nss" }, - "4": { - "name": "comment.inline.nss" + "3": { + "name": "keyword.control.constant.value.nss" } } }, @@ -53,7 +53,7 @@ "name": "comment.inline.nss" }, { - "match": "^\\s*(@var)\\s+((?:[^|=)\\]](?!\/\/))+)(\\|(?:[^=)\\]](?!\/\/))+)*(=?)(?=.*$)", + "match": "(@var)\\s+((?:[^|=)\\]](?!\/\/))+)(\\|(?:[^=)\\]](?!\/\/))+)*(=?)", "captures": { "1": { "name": "keyword.variable.declarator" @@ -72,7 +72,7 @@ ] }, "variable_ending": { - "match": "^\\s*@endvar\\s*$", + "match": "@endvar", "name": "keyword.variable.ending.declarator" }, "variable": { @@ -101,11 +101,11 @@ } }, { - "match": "[^|=]+?(?==)", + "match": "(?