From 27bf54ed340dd0d8436b59cbd206bd04bad3bfca Mon Sep 17 00:00:00 2001 From: undefined Date: Wed, 12 Oct 2022 12:14:49 +0800 Subject: [PATCH] core: fix contest image display for html --- packages/hydrooj/package.json | 2 +- packages/hydrooj/src/handler/problem.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index c2c37b1d9..e6c3c8440 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "4.0.14", + "version": "4.0.15", "bin": "bin/hydrooj.js", "main": "src/plugin-api", "module": "src/plugin-api", diff --git a/packages/hydrooj/src/handler/problem.ts b/packages/hydrooj/src/handler/problem.ts index f02c8afed..18a0207c7 100644 --- a/packages/hydrooj/src/handler/problem.ts +++ b/packages/hydrooj/src/handler/problem.ts @@ -400,7 +400,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler { return `="./${this.pdoc.docId}/file/${info[1]}${info[1].includes('?') ? '&' : '?'}tid=${args[1]}"`; }) .replace(/=\\"file:\/\/(.+?)\\"/g, (str) => { - const info = str.match(/=\\"file:\/\/(.+?)"/); + const info = str.match(/=\\"file:\/\/(.+?)\\"/); return `=\\"./${this.pdoc.docId}/file/${info[1]}${info[1].includes('?') ? '&' : '?'}tid=${args[1]}\\"`; }); } else {