highlighter: Fix regions and patterns inside regions (#2840)

* highlighter: Fix regions and patterns inside regions

* highlighting: Remove 2nd recursive highlightRegion() call

...and add limitGroup checks to pattern search.

* yaml: Add TODO type highlighting

* highlighting: Don't stop in highlightRegion() at empty lines

...because possible region line end pattern must be detected.

* syntax/sh: Correct string handling due to additional pattern handling

* syntax/sh: Remove slash in variables

* highlighter: Accept nested region only in case it's within the current reagion

* highlighter: Accept nested patterns only in case it's within the current reagion

* highlighter: Don't search for nesting in case the region end was found at start
This commit is contained in:
Jöran Karl
2023-07-11 22:49:12 +02:00
committed by GitHub
parent cb260bf6bf
commit ceaa143c62
3 changed files with 66 additions and 60 deletions

View File

@@ -42,18 +42,18 @@ rules:
- statement: " (-[A-Za-z]+|--[a-z]+)"
- identifier: "\\$\\{[0-9A-Za-z_:!%&=+#~@*^$?, .\\-\\/\\[\\]]+\\}"
- identifier: "\\$[0-9A-Za-z_:!%&=+#~@*^$?,\\-\\/\\[\\]]+"
- identifier: "\\$[0-9A-Za-z_:!%&=+#~@*^$?,\\-\\[\\]]+"
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
rules: []
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules: []
- comment: