From 3cb5637972ae9e3223943528307c16cd43dc382d Mon Sep 17 00:00:00 2001 From: octopus_yan Date: Mon, 18 Nov 2024 17:36:33 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=AF=BB=E5=8F=96layout=E6=97=B6=20?= =?UTF-8?q?=E5=BF=BD=E7=95=A5#=E5=8F=B7=E5=BC=80=E5=A4=B4=E6=96=87?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/octopusyan/dmt/utils/PBOUtil.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/cn/octopusyan/dmt/utils/PBOUtil.java b/src/main/java/cn/octopusyan/dmt/utils/PBOUtil.java index 7972fbe..6efe156 100644 --- a/src/main/java/cn/octopusyan/dmt/utils/PBOUtil.java +++ b/src/main/java/cn/octopusyan/dmt/utils/PBOUtil.java @@ -307,11 +307,14 @@ public class PBOUtil { if (StringUtils.isNoneEmpty(line) && matcher.matches()) { // 原文 String original = matcher.group(1); - // 开始下标 - Integer startIndex = line.indexOf(original); - // 添加单词 - if (original.length() > 1) { - wordItems.add(new WordItem(file, lines.get(), startIndex, original, "")); + + if (!original.startsWith("#")) { + // 开始下标 + Integer startIndex = line.indexOf(original); + // 添加单词 + if (original.length() > 1) { + wordItems.add(new WordItem(file, lines.get(), startIndex, original, "")); + } } }