From 46cf3d6fc34f7b95f6b3c5f7184d047490009fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Eszes?= Date: Fri, 5 Nov 2021 21:11:45 +0100 Subject: [PATCH] Fixes Node attributes protocol version highlighting (#6) Protocol version was not highlighted when it missed the quotes. Adds schema link to LDF syntax file. Bumps version number to 0.3.1. --- CHANGELOG.md | 6 ++++++ example/lin22.ldf | 2 +- package.json | 2 +- syntaxes/ldf.tmLanguage.json | 3 ++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 459c680..decae5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,16 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ## [Unreleased] +## [0.3.1] - 2021-11-05 + ### Added - LDF language included within markdown blocks are highlighted +### Fixed + +- `protocol_version` node attribute is properly highlighted when quotes are missing + ## [0.2.0] - 2021-11-02 ### Added diff --git a/example/lin22.ldf b/example/lin22.ldf index fceb3e3..7cc68a1 100644 --- a/example/lin22.ldf +++ b/example/lin22.ldf @@ -87,7 +87,7 @@ Node_attributes { } } remote_node { - LIN_protocol = "2.1" ; + LIN_protocol = 2.1; configured_NAD = 0x20 ; product_id = 0x5, 0xA5A5, 0 ; P2_min = 50 ms ; diff --git a/package.json b/package.json index 9bb686d..1439c35 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "lin" ], "license": "MIT", - "version": "0.3.0", + "version": "0.3.1", "preview": true, "publisher": "c4deszes", "repository": { diff --git a/syntaxes/ldf.tmLanguage.json b/syntaxes/ldf.tmLanguage.json index 215e53f..5daaf90 100644 --- a/syntaxes/ldf.tmLanguage.json +++ b/syntaxes/ldf.tmLanguage.json @@ -1,4 +1,5 @@ { + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "scopeName": "source.ldf", "injectionSelector": "L:text.html.markdown", "patterns": [ @@ -344,7 +345,7 @@ "end": "\\s*}" }, "node_definition_protocol": { - "match": "(LIN_protocol)\\s*=\\s*(?:(\"[0-9]+\\.[0-9]+\")|([0-9]+\\.[0-9]+))\\s*;", + "match": "(LIN_protocol)\\s*=\\s*((?:\"[0-9]+\\.[0-9]+\")|(?:[0-9]+\\.[0-9]+))\\s*;", "captures": { "1": { "name": "variable.parameter"