From 81f4089fd49ffc1443d6af636ed80892261cde36 Mon Sep 17 00:00:00 2001 From: nineya <361654768@qq.com> Date: Tue, 28 Mar 2023 14:22:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(code):=20=E4=BF=AE=E5=A4=8D=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/post.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/post.js b/src/js/post.js index 3cc29a7..78977a6 100644 --- a/src/js/post.js +++ b/src/js/post.js @@ -20,7 +20,7 @@ const postContext = { num = str2.index if (str1) { if (str1[1].endsWith(str2[0])) { - str1[1] = str1[1].substring(0, str2[0].length) + str1[1] = str1[1].substring(0, str1[1].length - str2[0].length) } } else { title = clazz.substring(9, str2.index) @@ -35,6 +35,7 @@ const postContext = { title = str1[1] } $(this).attr('class', clazz.substring(0, num)) + if (!title) title = clazz.substring(9, num) } else { title = clazz.substring(9) }