Skip to content

Commit

Permalink
Add tsv/tab/psv file extension to CSV Format mapping, closes #2159
Browse files Browse the repository at this point in the history
  • Loading branch information
gsantner committed Dec 27, 2023
1 parent 7541b2f commit 827d9c6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

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;
import java.io.File;
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.
Expand All @@ -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<String> assignedExtensions = GsCollectionUtils.asList(".csv", ".tsv", ".tab", ".psv");
return assignedExtensions.contains(extWithDot);
}

protected static class Csv2MdTable implements Closeable {
Expand Down

0 comments on commit 827d9c6

Please sign in to comment.