Skip to content

Commit

Permalink
Fixes Node attributes protocol version highlighting (#6)
Browse files Browse the repository at this point in the history
Protocol version was not highlighted when it missed the quotes.
Adds schema link to LDF syntax file.
Bumps version number to 0.3.1.
  • Loading branch information
c4deszes authored Nov 5, 2021
1 parent 942a56b commit 46cf3d6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/lin22.ldf
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"lin"
],
"license": "MIT",
"version": "0.3.0",
"version": "0.3.1",
"preview": true,
"publisher": "c4deszes",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion syntaxes/ldf.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"scopeName": "source.ldf",
"injectionSelector": "L:text.html.markdown",
"patterns": [
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 46cf3d6

Please sign in to comment.