From 76b2edba8cabaa9de8fa4ce7c869a1158af41932 Mon Sep 17 00:00:00 2001 From: undefined Date: Fri, 18 Oct 2024 11:00:47 +0800 Subject: [PATCH] ui: fix problemId display --- packages/ui-default/templates/components/problem.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui-default/templates/components/problem.html b/packages/ui-default/templates/components/problem.html index 245711184..92a17700c 100644 --- a/packages/ui-default/templates/components/problem.html +++ b/packages/ui-default/templates/components/problem.html @@ -8,7 +8,7 @@ {%- if tdoc and alphabetic -%} {{ String.fromCharCode(65 + tdoc.pids.indexOf(pdoc.docId)) if tdoc.pids.includes(pdoc.docId) else '#' }} {%- else -%} - {{ pdoc.pid.split('-')[1] if pdoc.pid else ('P'+pdoc.docId) }} + {{ (pdoc.pid.split('-')[1] if pdoc.pid.includes('-') else pdoc.pid) if pdoc.pid else ('P'+pdoc.docId) }} {%- endif -%} {%- if not small -%}  {{ pdoc.title }}{%- endif -%} {%- if not invalid -%}