mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-23 00:22:56 +01:00
terraform Fix heredoc
This commit is contained in:
parent
be30e69ac2
commit
c16c8958e5
2 changed files with 30 additions and 1 deletions
|
|
@ -992,6 +992,35 @@ testTokenization('hcl', [
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
/*
|
/*
|
||||||
|
foo = <<-EOF
|
||||||
|
bar
|
||||||
|
EOF
|
||||||
|
*/
|
||||||
|
[
|
||||||
|
{
|
||||||
|
line: ' foo = <<-EOF',
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: '' },
|
||||||
|
{ startIndex: 2, type: 'variable.hcl' },
|
||||||
|
{ startIndex: 5, type: '' },
|
||||||
|
{ startIndex: 6, type: 'operator.hcl' },
|
||||||
|
{ startIndex: 7, type: '' },
|
||||||
|
{ startIndex: 8, type: 'string.heredoc.delimiter.hcl' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
line: ' bar',
|
||||||
|
tokens: [{ startIndex: 0, type: 'string.heredoc.hcl' }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
line: ' EOF',
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'string.heredoc.hcl' },
|
||||||
|
{ startIndex: 2, type: 'string.heredoc.delimiter.hcl' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
/*
|
||||||
foo = <<EOF
|
foo = <<EOF
|
||||||
bar
|
bar
|
||||||
EOF
|
EOF
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
],
|
],
|
||||||
heredocBody: [
|
heredocBody: [
|
||||||
[
|
[
|
||||||
/^([\w\-]+)$/,
|
/([\w\-]+)$/,
|
||||||
{
|
{
|
||||||
cases: {
|
cases: {
|
||||||
'$1==$S2': [
|
'$1==$S2': [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue