Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaowei
dlink
Commits
b81fb0bc
Unverified
Commit
b81fb0bc
authored
Mar 29, 2022
by
aiwenmo
Committed by
GitHub
Mar 29, 2022
Browse files
Options
Browse Files
Download
Plain Diff
[Fix][web] Fix the bug of beautifying "||" in the editor
[Fix][web] Fix the bug of beautifying "||" in the editor
parents
34555b1e
f94cea8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
index.tsx
dlink-web/src/components/Studio/StudioEdit/index.tsx
+4
-3
No files found.
dlink-web/src/components/Studio/StudioEdit/index.tsx
View file @
b81fb0bc
...
...
@@ -157,9 +157,10 @@ const FlinkSqlEditor = (props:any) => {
var
formatted
=
format
(
model
.
getValueInRange
(
range
),
{
indent
:
' '
.
repeat
(
options
.
tabSize
)
});
formatted
=
formatted
.
replace
(
/`
([^
`
]
*
)
`/g
,
function
(){
return
'`'
+
arguments
[
1
].
trim
()
+
'`'
})
.
replace
(
/
\$
{
([^
}
]
*
)
}/g
,
function
(){
return
'${'
+
arguments
[
1
].
trim
()
+
'}'
})
.
replace
(
/
\|
([^
}
]
*
)\|
/g
,
function
(){
return
'|'
+
arguments
[
1
].
trim
()
+
'|'
})
formatted
=
formatted
.
replaceAll
(
/`
([^
`
]
*
)
`/g
,
function
(){
return
'`'
+
arguments
[
1
].
trim
()
+
'`'
})
.
replaceAll
(
/
\$
{
([^
}
]
*
)
}/g
,
function
(){
return
'${'
+
arguments
[
1
].
trim
()
+
'}'
})
.
replaceAll
(
/
\|
([^
}
]
*
)\|
/g
,
function
(){
return
'|'
+
arguments
[
1
].
trim
()
+
'|'
})
.
replaceAll
(
/ - /g
,
function
(){
return
'-'
});
return
[
{
range
:
range
,
...
...
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