tree doc sql delete --

This commit is contained in:
林万程
2023-12-19 19:07:18 +08:00
parent fbaa4cc9e7
commit 6eb1602d4f
2 changed files with 5 additions and 3 deletions

View File

@@ -174,7 +174,7 @@ public abstract class BaseLangDoc extends EditorLinePainter {
} }
/** /**
* Override like Java/Kotlin * Override like Java/Kotlin/Python
*/ */
@Nullable @Nullable
protected <T extends SettingsInfo> String resolveDocPrint(@NotNull T lineInfo, @NotNull PsiElement resolve) { protected <T extends SettingsInfo> String resolveDocPrint(@NotNull T lineInfo, @NotNull PsiElement resolve) {

View File

@@ -23,7 +23,9 @@ public class DocFilter {
// **** xx block body // **** xx block body
"|^ *\\*++ *+" + "|^ *\\*++ *+" +
// #### xx python and shell start // #### xx python and shell start
"|^ *#++ *+" "|^ *#++ *+" +
// -- xx SQL
"|^ *--++ *+"
); );
private static final Pattern LINE_SEPARATOR_PATTERN = Pattern.compile("[\r\n]"); private static final Pattern LINE_SEPARATOR_PATTERN = Pattern.compile("[\r\n]");
@@ -33,7 +35,7 @@ public class DocFilter {
* end with space * end with space
*/ */
@NotNull @NotNull
public static <T extends SettingsInfo> String cutDoc(String text, @NotNull T info, boolean deletePrefix) { public static <T extends SettingsInfo> String cutDoc(@NotNull String text, @NotNull T info, boolean deletePrefix) {
String[] split = LINE_SEPARATOR_PATTERN.split(text); String[] split = LINE_SEPARATOR_PATTERN.split(text);
int lineCount = 0; int lineCount = 0;
@NotNull StringBuilder sb = new StringBuilder(); @NotNull StringBuilder sb = new StringBuilder();