Browse Source

grammar: add (double quoted) string interpolations #{test} using Ruby

Related to adamchainz/fluentd.tmLanguage#3
tags/v1.1.0
cn 3 years ago
parent
commit
cbdeef4bba
2 changed files with 13 additions and 0 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +12
    -0
      grammars/fluentd.cson

+ 1
- 0
CHANGELOG.md View File

@ -10,6 +10,7 @@ NEW FEATURES:
- Support array and hash (using JSON source) value types like `["foo","bar"]`
- Support integer, time and size value types (e.g. `property 100`, `bufsize 5M` or `finterval 5s`)
- Support highlighting ${variables} (used by e.g. [record_transformer plugin](https://docs.fluentd.org/v0.12/articles/filter_record_transformer))
- Support (double quoted) string interpolations like `#{Time.new.to_i + 1}` (using Ruby source)
IMPROVEMENTS:


+ 12
- 0
grammars/fluentd.cson View File

@ -93,6 +93,7 @@ repository:
name: 'meta.value.string.quoted.double.fluentd'
patterns: [
{include: '#stringescapes'}
{include: '#stringinterpolations'}
]
}
{
@ -168,3 +169,14 @@ repository:
name: 'constant.string.escape.fluentd'
}
]
stringinterpolations:
patterns: [
{
begin: '#\\{'
end: '\\}'
name: 'constant.string.interpolation.fluentd'
patterns: [
{include: 'source.ruby'}
]
}
]

Loading…
Cancel
Save