Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zheng Yile
codiaclient
Commits
1dc36cdc
Commit
1dc36cdc
authored
Jul 14, 2021
by
Zheng Yile
Browse files
修改没有缺省代码时的预处理bug
parent
780db951
Changes
1
Hide whitespace changes
Inline
Side-by-side
mainFunctions.py
View file @
1dc36cdc
...
...
@@ -286,7 +286,11 @@ def frameQuestionInit():
languages
=
[
toDisplay
[
lang
]
for
lang
in
variables
[
"exerciseInfo"
][
"supportedLanguages"
]]
uiMain
.
comboBoxLanguage
.
addItems
(
languages
)
uiMain
.
labelSubmitStatus
.
setText
(
uiMain
.
labelQuestionStatus
.
text
())
uiMain
.
textEditSubmit
.
setHtml
(
highlight
(
variables
[
"exerciseInfo"
][
"codeSnippet"
],
currentLexer
,
currentFormatter
).
replace
(
'
\r\n
'
,
'
\n
'
)[:
-
1
])
global
currentLexer
,
currentFormatter
if
variables
[
"exerciseInfo"
][
"codeSnippet"
]:
uiMain
.
textEditSubmit
.
setHtml
(
highlight
(
variables
[
"exerciseInfo"
][
"codeSnippet"
],
currentLexer
,
currentFormatter
).
replace
(
'
\r\n
'
,
'
\n
'
)[:
-
1
])
else
:
uiMain
.
textEditSubmit
.
setText
(
""
)
def
Highlighting
():
pos
=
uiMain
.
textEditSubmit
.
textCursor
().
position
()
...
...
@@ -401,7 +405,8 @@ def BeginMain(callback=None):
def
frameCodeInit
():
code
=
variables
[
"submitHistory"
][
variables
[
"currentHistoryRow"
]][
"solution"
][
"asset"
][
"content"
]
global
currentLexer
,
currentFormatter
uiMain
.
textEditCode
.
setHtml
(
highlight
(
code
,
currentLexer
,
currentFormatter
).
replace
(
'
\r\n
'
,
'
\n
'
)[:
-
1
])
if
code
:
uiMain
.
textEditCode
.
setHtml
(
highlight
(
code
,
currentLexer
,
currentFormatter
).
replace
(
'
\r\n
'
,
'
\n
'
)[:
-
1
])
def
frameTestDataInit
():
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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