Skip to content

Commit

Permalink
Added astro extension to TSX and fixed block comments (#338)
Browse files Browse the repository at this point in the history
* Added astro extension to TSX and fixed block comments

* Update manifest.json
  • Loading branch information
felixsanz authored Nov 11, 2023
1 parent 51246d8 commit 0c0aa76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@
},
{
"description": "Syntax for [TSX](https://www.typescriptlang.org/docs/handbook/jsx.html) language",
"version": "0.1",
"version": "0.2",
"path": "plugins/language_tsx.lua",
"id": "language_tsx",
"mod_version": "3",
Expand Down
5 changes: 3 additions & 2 deletions plugins/language_tsx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ local syntax = require "core.syntax"

syntax.add {
name = "TypeScript with JSX",
files = { "%.tsx$" },
files = { "%.tsx$", "%.astro$" },
comment = "//",
block_comment = { "/*", "*/" },
patterns = {
{ pattern = "//.-\n", type = "comment" },
{ pattern = "//.*", type = "comment" },
{ pattern = { "/%*", "%*/" }, type = "comment" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
Expand Down

0 comments on commit 0c0aa76

Please sign in to comment.