ui: fix contest_submit

This commit is contained in:
undefined committed 2021-05-23 21:48:04 +08:00
1 parent aed95cc7e6
commit a02c859d04
3 files changed
+7 -7

No files matched your search

+5 -5
View File
@@ -270,6 +270,11 @@ class ContestProblemHandler extends Handler {
attended: this.attended,
page_name: 'contest_detail_problem',
};
try {
this.response.body.pdoc.config = await parseConfig(this.pdoc.config);
} catch (e) {
this.response.body.pdoc.config = `Cannot parse: ${e.message}`;
}
}
// eslint-disable-next-line
@@ -284,11 +289,6 @@ class ContestProblemHandler extends Handler {
// e.g. ![img](a.jpg) will navigate to ![img](./pid/file/a.jpg)
this.response.body.pdoc.content = this.response.body.pdoc.content
.replace(/\(file:\/\//g, `(./${this.pdoc.docId}/file/`);
try {
this.response.body.pdoc.config = await parseConfig(this.pdoc.config);
} catch (e) {
this.response.body.pdoc.config = `Cannot parse: ${e.message}`;
}
}
}