diff --git a/README.md b/README.md
index 60a98bf..9c3b037 100644
--- a/README.md
+++ b/README.md
@@ -56,6 +56,7 @@ https://plugins.jetbrains.com/plugin/18553-show-comment
English Change Notes:
+- 1.15 Add line-end-comment support COBOL ext '', 'cbl', 'cob', 'cobol'
- 1.14 Add line-end-comment skip Annotation, skip only English (ASCII)
- 1.13 Add Copy With Line Comment & Add Line Comment
- 1.12 ★ External Comment for COBOL etc
@@ -74,6 +75,7 @@ https://plugins.jetbrains.com/plugin/18553-show-comment
中文更新说明:
+- 1.15 增加 行末注释 COBOL 拓展名支持 无拓展名、cbl、cob、cobol
- 1.14 增加 行末注释 忽略注解 与 忽略纯英文
- 1.13 增加 带行末注释复制 和 添加行末注释
- 1.12 ★ 外部注释用于 COBOL 等
diff --git a/build.gradle b/build.gradle
index 1477edf..dc32239 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,7 +4,7 @@ plugins {
}
group 'io.github.linwancen'
-version '1.14.0.' + (new Date().format('yyyy.MM.dd_HH.mm'))
+version '1.15.0.' + (new Date().format('yyyy.MM.dd_HH.mm'))
apply plugin: 'java'
@@ -39,6 +39,7 @@ patchPluginXml {
changeNotes = """
English Change Notes:
+- 1.15 Add line-end-comment support COBOL ext '', 'cbl', 'cob', 'cobol'
- 1.14 Add line-end-comment skip Annotation, skip only English (ASCII)
- 1.13 Add Copy With Line Comment & Add Line Comment
- 1.12 ★ External Comment for COBOL etc
@@ -57,6 +58,7 @@ patchPluginXml {
中文更新说明:
+- 1.15 增加 行末注释 COBOL 拓展名支持 无拓展名、cbl、cob、cobol
- 1.14 增加 行末注释 忽略注解 与 忽略纯英文
- 1.13 增加 带行末注释复制 和 添加行末注释
- 1.12 ★ 外部注释用于 COBOL 等
diff --git a/src/main/java/io/github/linwancen/plugin/show/ext/LineExt.java b/src/main/java/io/github/linwancen/plugin/show/ext/LineExt.java
index a5305a3..40e1f14 100644
--- a/src/main/java/io/github/linwancen/plugin/show/ext/LineExt.java
+++ b/src/main/java/io/github/linwancen/plugin/show/ext/LineExt.java
@@ -30,7 +30,7 @@ public class LineExt {
return null;
}
Map>> treeMap = ConfCache.treeMap(path);
- if ("cbl".equals(ext)) {
+ if (ext == null || "cbl".equals(ext) || "cob".equals(ext) || "cobol".equals(ext)) {
text = cblNotAndOr(text);
}
String[] words = pattern.split(text);
@@ -53,7 +53,7 @@ public class LineExt {
}
String key = matcher.group(1);
// put NOT first
- text = matcher.replaceAll("$2 ( $1 = '");
+ text = matcher.replaceAll(" $2 ( $1 = '");
// add key after AND/OR
return AND_OR_PATTERN.matcher(text).replaceAll("$1 " + key + " = '");
}
diff --git a/src/main/java/io/github/linwancen/plugin/show/ext/conf/ConfCacheGetUtils.java b/src/main/java/io/github/linwancen/plugin/show/ext/conf/ConfCacheGetUtils.java
index f0e15fe..4ddbba2 100644
--- a/src/main/java/io/github/linwancen/plugin/show/ext/conf/ConfCacheGetUtils.java
+++ b/src/main/java/io/github/linwancen/plugin/show/ext/conf/ConfCacheGetUtils.java
@@ -48,7 +48,10 @@ class ConfCacheGetUtils {
map.put(levelStr + "\b" + confPath, entry.getValue());
} else if (confName.endsWith((name + confMidExt))) {
map.put(levelStr + "\t" + confPath, entry.getValue());
- } else if (ext != null) {
+ } else{
+ if (ext == null) {
+ ext = "";
+ }
if ((ext + confMidExt).equals(confName)) {
map.put(levelStr + "\n" + confPath, entry.getValue());
} else if (confName.endsWith((ext + confMidExt))) {