Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
260f47b0
Commit
260f47b0
authored
Jan 13, 2021
by
Hugo Fonseca
Committed by
Kushal Pandya
Jan 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix terraform language syntax in IDE
parent
98c9897a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
app/assets/javascripts/ide/lib/languages/hcl.js
app/assets/javascripts/ide/lib/languages/hcl.js
+1
-1
spec/frontend/ide/lib/languages/hcl_spec.js
spec/frontend/ide/lib/languages/hcl_spec.js
+36
-0
No files found.
app/assets/javascripts/ide/lib/languages/hcl.js
View file @
260f47b0
...
...
@@ -140,7 +140,7 @@ const language = {
],
heredocBody
:
[
[
/
^
([\w\-]
+
)
$/
,
/
([\w\-]
+
)
$/
,
{
cases
:
{
'
$1==$S2
'
:
[
...
...
spec/frontend/ide/lib/languages/hcl_spec.js
View file @
260f47b0
...
...
@@ -284,6 +284,42 @@ describe('tokenization for .tf files', () => {
],
],
],
[
` foo = <<-EOF
bar
EOF`
,
[
[
{
language
:
'
hcl
'
,
offset
:
0
,
type
:
''
},
{
language
:
'
hcl
'
,
offset
:
2
,
type
:
'
variable.hcl
'
},
{
language
:
'
hcl
'
,
offset
:
5
,
type
:
''
},
{
language
:
'
hcl
'
,
offset
:
6
,
type
:
'
operator.hcl
'
},
{
language
:
'
hcl
'
,
offset
:
7
,
type
:
''
},
{
language
:
'
hcl
'
,
offset
:
8
,
type
:
'
string.heredoc.delimiter.hcl
'
},
],
[{
language
:
'
hcl
'
,
offset
:
0
,
type
:
'
string.heredoc.hcl
'
}],
[
{
language
:
'
hcl
'
,
offset
:
0
,
type
:
'
string.heredoc.hcl
'
},
{
language
:
'
hcl
'
,
offset
:
2
,
type
:
'
string.heredoc.delimiter.hcl
'
},
],
],
],
[
`foo = <<-EOF
bar
EOF`
,
[
[
{
language
:
'
hcl
'
,
offset
:
0
,
type
:
'
variable.hcl
'
},
{
language
:
'
hcl
'
,
offset
:
3
,
type
:
''
},
{
language
:
'
hcl
'
,
offset
:
4
,
type
:
'
operator.hcl
'
},
{
language
:
'
hcl
'
,
offset
:
5
,
type
:
''
},
{
language
:
'
hcl
'
,
offset
:
6
,
type
:
'
string.heredoc.delimiter.hcl
'
},
],
[{
language
:
'
hcl
'
,
offset
:
0
,
type
:
'
string.heredoc.hcl
'
}],
[{
language
:
'
hcl
'
,
offset
:
0
,
type
:
'
string.heredoc.delimiter.hcl
'
}],
],
],
])(
'
%s
'
,
(
string
,
tokens
)
=>
{
expect
(
editor
.
tokenize
(
string
,
'
hcl
'
)).
toEqual
(
tokens
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment