From 827d9c6ae48187339bd2c767b8b588402fad76eb Mon Sep 17 00:00:00 2001 From: Gregor Santner Date: Wed, 27 Dec 2023 12:55:19 +0100 Subject: [PATCH] Add tsv/tab/psv file extension to CSV Format mapping, closes #2159 --- .../net/gsantner/markor/format/csv/CsvTextConverter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/gsantner/markor/format/csv/CsvTextConverter.java b/app/src/main/java/net/gsantner/markor/format/csv/CsvTextConverter.java index 7203bcc1de..d8473a6e40 100644 --- a/app/src/main/java/net/gsantner/markor/format/csv/CsvTextConverter.java +++ b/app/src/main/java/net/gsantner/markor/format/csv/CsvTextConverter.java @@ -20,6 +20,7 @@ import net.gsantner.markor.format.TextConverterBase; import net.gsantner.markor.format.markdown.MarkdownTextConverter; +import net.gsantner.opoc.util.GsCollectionUtils; import java.io.BufferedReader; import java.io.Closeable; @@ -27,8 +28,7 @@ import java.io.IOException; import java.io.Reader; import java.io.StringReader; - -import other.de.stanetz.jpencconverter.JavaPasswordbasedCryption; +import java.util.List; /** * Part of Markor-Architecture implementing Preview/Export for csv. @@ -49,8 +49,8 @@ public String convertMarkup(String csvMarkup, Context context, boolean lightMode @Override protected boolean isFileOutOfThisFormat(String filepath, String extWithDot) { - filepath = filepath.replace(JavaPasswordbasedCryption.DEFAULT_ENCRYPTION_EXTENSION, ""); - return filepath.toLowerCase().endsWith(".csv"); + final List assignedExtensions = GsCollectionUtils.asList(".csv", ".tsv", ".tab", ".psv"); + return assignedExtensions.contains(extWithDot); } protected static class Csv2MdTable implements Closeable {