Skip to content

Commit 87e100b

Browse files
committed
Match file ext on lowercase
1 parent 609800d commit 87e100b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/main/kotlin/org/ivdnt/galahad/documents/DocumentFormat.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ enum class DocumentFormat(val identifier: String, val extension: String) {
3737
)
3838

3939
/** Get format of a document based on its file extension or content (e.g. root XML node). */
40-
fun fromFile(file: File): DocumentFormat = when (file.extension) {
40+
fun fromFile(file: File): DocumentFormat = when (file.extension.lowercase()) {
4141
"tsv" -> Tsv
4242
"folia" -> Folia
4343
"conllu" -> Conllu

0 commit comments

Comments
 (0)