mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 19:17:09 +03:00
Use correct comment delimiters within JSX when using a TSX grammar
This commit is contained in:
parent
ff34f2daf2
commit
10907fb40f
@ -38,3 +38,21 @@
|
||||
(#set! adjust.startAt lastChild.previousSibling.startPosition)
|
||||
(#set! adjust.endAt lastChild.endPosition)
|
||||
(#set! capture.final true))
|
||||
|
||||
|
||||
; META
|
||||
; ====
|
||||
|
||||
([
|
||||
(jsx_opening_element)
|
||||
(jsx_closing_element)
|
||||
] @meta.jsx.inside-tag.ts.tsx
|
||||
(#set! adjust.startAt firstChild.endPosition))
|
||||
|
||||
((jsx_self_closing_element) @meta.jsx.inside-tag.ts.tsx
|
||||
(#set! adjust.startAt firstChild.endPosition)
|
||||
(#set! adjust.endAt lastChild.startPosition))
|
||||
|
||||
((jsx_element) @meta.block.jsx.ts.tsx
|
||||
(#set! adjust.startAt firstChild.endPosition)
|
||||
(#set! adjust.endAt lastChild.startPosition))
|
||||
|
@ -11,9 +11,9 @@
|
||||
^ \\s* (\\s* /[*] .* [*]/ \\s*)* [}\\])]
|
||||
'
|
||||
|
||||
'.meta.tag.tsx':
|
||||
'.meta.tag.tsx, .meta.block.jsx.ts.tsx':
|
||||
'editor':
|
||||
'commentStart': '{/* ',
|
||||
'commentEnd': ' */}',
|
||||
'increaseIndentPattern': "{[^}\"']*$|\\[[^\\]\"']*$|\\([^)\"']*$|<[a-zA-Z][^/]*$|^\\s*>$",
|
||||
'decreaseIndentPattern': "^\\s*(\\s*/[*].*[*]/\\s*)*[}\\])]|^\\s*(</|/>)"
|
||||
'decreaseIndentPattern': "^\\s*(\\s*/[*].*[*]/\\s*)*[}\\])]|^\\s*(</|/>)"
|
||||
|
Loading…
Reference in New Issue
Block a user