Skip to content

Commit

Permalink
v1.2.2: fix label
Browse files Browse the repository at this point in the history
  • Loading branch information
tientq64 committed Sep 28, 2023
1 parent b24f619 commit 6515c9a
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [1.2.2] - 2023-09-28

- Syntax highlighting:
+ Fix: `break`, `continue` are not highlighted when the label name begins with a keyword.

## [1.2.1] - 2023-09-27

- Syntax highlighting:
Expand Down
5 changes: 5 additions & 0 deletions dist/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [1.2.2] - 2023-09-28

- Syntax highlighting:
+ Fix: `break`, `continue` are not highlighted when the label name begins with a keyword.

## [1.2.1] - 2023-09-27

- Syntax highlighting:
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"livescript-vscode","version":"1.2.1","displayName":"LiveScript 2","description":"Syntax highlighting, autocomplete, and snippets","icon":"./icon.png","publisher":"tientq64","author":{"name":"tientq64","email":"tientq64@gmail.com","url":"https://github.com/tientq64"},"repository":{"type":"git","url":"https://github.com/tientq64/livescript-vscode.git"},"bugs":{"url":"https://github.com/tientq64/livescript-vscode/issues","email":"tientq64@gmail.com"},"engines":{"vscode":"^1.74.0"},"categories":["Programming Languages","Snippets"],"keywords":["livescript","syntax-highlighting","autocomplete","snippets","vscode-extension"],"scripts":{"build-and-publish":"ls2 build.ls && cd dist && vsce publish"},"devDependencies":{"fs-extra":"^11.1.1","livescript2":"^1.5.0","terser":"^5.20.0","js-yaml":"^4.1.0","@vscode/vsce":"^2.21.0"},"contributes":{"languages":[{"id":"livescript","aliases":["LiveScript"],"extensions":[".ls",".livescript"],"configuration":"./language-configuration.json"}],"grammars":[{"language":"livescript","scopeName":"source.livescript","path":"./syntaxes/livescript.tmLanguage.json"}],"snippets":[{"language":"livescript","path":"./snippets/livescript.code-snippets"}]},"license":"MIT"}
{"name":"livescript-vscode","version":"1.2.2","displayName":"LiveScript 2","description":"Syntax highlighting, autocomplete, and snippets","icon":"./icon.png","publisher":"tientq64","author":{"name":"tientq64","email":"tientq64@gmail.com","url":"https://github.com/tientq64"},"repository":{"type":"git","url":"https://github.com/tientq64/livescript-vscode.git"},"bugs":{"url":"https://github.com/tientq64/livescript-vscode/issues","email":"tientq64@gmail.com"},"engines":{"vscode":"^1.74.0"},"categories":["Programming Languages","Snippets"],"keywords":["livescript","syntax-highlighting","autocomplete","snippets","vscode-extension"],"scripts":{"build-and-publish":"ls2 build.ls && cd dist && vsce publish"},"devDependencies":{"fs-extra":"^11.1.1","livescript2":"^1.5.0","terser":"^5.20.0","js-yaml":"^4.1.0","@vscode/vsce":"^2.21.0"},"contributes":{"languages":[{"id":"livescript","aliases":["LiveScript"],"extensions":[".ls",".livescript"],"configuration":"./language-configuration.json"}],"grammars":[{"language":"livescript","scopeName":"source.livescript","path":"./syntaxes/livescript.tmLanguage.json"}],"snippets":[{"language":"livescript","path":"./snippets/livescript.code-snippets"}]},"license":"MIT"}
2 changes: 1 addition & 1 deletion dist/syntaxes/livescript.tmLanguage.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "livescript-vscode",
"version": "1.2.1",
"version": "1.2.2",
"displayName": "LiveScript 2",
"description": "Syntax highlighting, autocomplete, and snippets",
"icon": "./icon.png",
Expand Down
12 changes: 12 additions & 0 deletions sample.ls
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@ nam3~10 = ->

:build loop
break build
break if
break if a > 0
break ifaa
break if44
break if$
break if_
break aaif
break 44if
break $if
break _if
break and
break class A

obj =
if: 4
Expand Down
4 changes: 2 additions & 2 deletions syntaxes/livescript.tmLanguage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,13 @@ repository:

label:
patterns:
- match: (:)(?!<<keywords>>)(<<ident>>)
- match: (:)(?!(?:<<keywords>>)(?![\w$]))(<<ident>>)
captures:
1:
name: punctuation.separator.label.livescript
2:
name: entity.name.label.livescript
- match: (break|continue)\s+(?!<<keywords>>)(<<ident>>)
- match: (break|continue)\s+(?!(?:<<keywords>>)(?![\w$]))(<<ident>>)
captures:
1:
name: keyword.control.livescript
Expand Down

0 comments on commit 6515c9a

Please sign in to comment.