Browse Source

grammar: add support for escape sequenes in single, double and unquoted strings

tags/v1.1.0
cn 3 years ago
parent
commit
ee37db2d42
2 changed files with 18 additions and 0 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +17
    -0
      grammars/fluentd.cson

+ 1
- 0
CHANGELOG.md View File

@ -6,6 +6,7 @@ NEW FEATURES:
- Support folding markers for directives like `<source>...</source>`
- Support toggling comments
- Support escape sequenes like `foo\nbar` in single, double and unquoted strings
IMPROVEMENTS:


+ 17
- 0
grammars/fluentd.cson View File

@ -78,6 +78,10 @@ repository:
values:
patterns: [
{
match: '\\\\.'
name: 'value.string.escape.fluentd'
}
{
begin: '(")'
beginCaptures:
'1':
@ -87,6 +91,9 @@ repository:
'1':
name: 'punctuation.definition.string.end.fluentd'
name: 'meta.value.string.quoted.double.fluentd'
patterns: [
{include: '#stringescapes'}
]
}
{
begin: "(')"
@ -98,6 +105,9 @@ repository:
'1':
name: 'punctuation.definition.string.end.fluentd'
name: 'meta.value.string.quoted.single.fluentd'
patterns: [
{include: '#stringescapes'}
]
}
{
match: '([^\\s]+?)'
@ -107,3 +117,10 @@ repository:
name: 'string.unquoted.fluentd'
}
]
stringescapes:
patterns: [
{
match: '\\\\.'
name: 'constant.string.escape.fluentd'
}
]

Loading…
Cancel
Save