core&ui: optimize injectable

This commit is contained in:
undefined committed 2022-09-07 20:30:44 +08:00
1 parent 25444f69f0
commit 7343c596e9
9 files changed
+64 -64

No files matched your search

+6 -1
View File
@@ -396,11 +396,16 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
.replace(/="file:\/\/(.+?)"/g, (str) => {
const info = str.match(/="file:\/\/(.+?)"/);
return `="./${this.pdoc.docId}/file/${info[1]}${info[1].includes('?') ? '&' : '?'}tid=${args[1]}"`;
})
.replace(/=\\"file:\/\/(.+?)"/g, (str) => {
const info = str.match(/=\\"file:\/\/(.+?)"/);
return `=\\"./${this.pdoc.docId}/file/${info[1]}${info[1].includes('?') ? '&' : '?'}tid=${args[1]}"`;
});
} else {
this.response.body.pdoc.content = this.response.body.pdoc.content
.replace(/\(file:\/\//g, `(./${this.pdoc.docId}/file/`)
.replace(/="file:\/\//g, `="./${this.pdoc.docId}/file/`);
.replace(/="file:\/\//g, `="./${this.pdoc.docId}/file/`)
.replace(/=\\"file:\/\//g, `=\\"${this.pdoc.docId}/file/`);
}
}
this.response.body.page_name = this.tdoc