From 0c165d61ffeefbd35fc5b20e095ee5d97367915a Mon Sep 17 00:00:00 2001
From: yuetsh <517252939@qq.com>
Date: Wed, 3 Jun 2026 08:16:08 -0600
Subject: [PATCH] revert
---
src/oj/learn/components/ExerciseFill.vue | 9 +--------
src/oj/learn/components/ExerciseMcq.vue | 11 ++---------
src/oj/learn/components/ExerciseSort.vue | 9 +--------
3 files changed, 4 insertions(+), 25 deletions(-)
diff --git a/src/oj/learn/components/ExerciseFill.vue b/src/oj/learn/components/ExerciseFill.vue
index 15fceae..8eea7a2 100644
--- a/src/oj/learn/components/ExerciseFill.vue
+++ b/src/oj/learn/components/ExerciseFill.vue
@@ -8,13 +8,6 @@ hljs.registerLanguage("python", python)
hljs.registerLanguage("c", c)
const props = defineProps<{ exercise: Exercise; lang?: string }>()
-
-function renderInlineCode(s: string): string {
- return s.replace(
- /`([^`]+)`/g,
- (_, code) => `${code.replace(//g, '>')}`,
- )
-}
const data = computed(() => props.exercise.data as ExerciseFillData)
type CodeSeg = { type: "code"; html: string }
@@ -101,7 +94,7 @@ function inputWidth(idx: number): string {
>
-
{{ data.question }}
()
-
-function renderInlineCode(s: string): string {
- return s.replace(
- /`([^`]+)`/g,
- (_, code) => `${code.replace(//g, '>')}`,
- )
-}
const data = computed(() => props.exercise.data as ExerciseMcqData)
const isSingle = computed(() => data.value.answer.length === 1)
@@ -81,7 +74,7 @@ function optionType(idx: number): "default" | "primary" | "success" {
-
+ {{ data.question }}
-
+ {{ opt }}
diff --git a/src/oj/learn/components/ExerciseSort.vue b/src/oj/learn/components/ExerciseSort.vue
index 2da364f..eaf2697 100644
--- a/src/oj/learn/components/ExerciseSort.vue
+++ b/src/oj/learn/components/ExerciseSort.vue
@@ -8,13 +8,6 @@ hljs.registerLanguage("python", python)
hljs.registerLanguage("c", c)
const props = defineProps<{ exercise: Exercise; lang?: string }>()
-
-function renderInlineCode(s: string): string {
- return s.replace(
- /`([^`]+)`/g,
- (_, code) => `${code.replace(//g, '>')}`,
- )
-}
const data = computed(() => props.exercise.data as ExerciseSortData)
type LineItem = { originalIdx: number; text: string }
@@ -117,7 +110,7 @@ const lineHtmlMap = computed>(() => {
>
-
+ {{ data.question }}