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
f94cea8a
Commit
f94cea8a
authored
Mar 29, 2022
by
JinPeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix][web] Fix the bug of beautifying "||" in the editor
parent
3e5a6bfb
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 @
f94cea8a
...
@@ -157,9 +157,10 @@ const FlinkSqlEditor = (props:any) => {
...
@@ -157,9 +157,10 @@ const FlinkSqlEditor = (props:any) => {
var
formatted
=
format
(
model
.
getValueInRange
(
range
),
{
var
formatted
=
format
(
model
.
getValueInRange
(
range
),
{
indent
:
' '
.
repeat
(
options
.
tabSize
)
indent
:
' '
.
repeat
(
options
.
tabSize
)
});
});
formatted
=
formatted
.
replace
(
/`
([^
`
]
*
)
`/g
,
function
(){
return
'`'
+
arguments
[
1
].
trim
()
+
'`'
})
formatted
=
formatted
.
replaceAll
(
/`
([^
`
]
*
)
`/g
,
function
(){
return
'`'
+
arguments
[
1
].
trim
()
+
'`'
})
.
replace
(
/
\$
{
([^
}
]
*
)
}/g
,
function
(){
return
'${'
+
arguments
[
1
].
trim
()
+
'}'
})
.
replaceAll
(
/
\$
{
([^
}
]
*
)
}/g
,
function
(){
return
'${'
+
arguments
[
1
].
trim
()
+
'}'
})
.
replace
(
/
\|
([^
}
]
*
)\|
/g
,
function
(){
return
'|'
+
arguments
[
1
].
trim
()
+
'|'
})
.
replaceAll
(
/
\|
([^
}
]
*
)\|
/g
,
function
(){
return
'|'
+
arguments
[
1
].
trim
()
+
'|'
})
.
replaceAll
(
/ - /g
,
function
(){
return
'-'
});
return
[
return
[
{
{
range
:
range
,
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