Skip to content

Commit 3938fff

Browse files
committed
Downcase file name before comparing against Markdown extensions
1 parent df3e562 commit 3938fff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/com/github/mobile/util/MarkdownUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package com.github.mobile.util;
1717

18+
import static java.util.Locale.US;
1819
import android.text.TextUtils;
1920

2021
/**
@@ -31,10 +32,11 @@ public class MarkdownUtils {
3132
* @param name
3233
* @return true if the name has a markdown extension, false otherwise
3334
*/
34-
public static boolean isMarkdown(final String name) {
35+
public static boolean isMarkdown(String name) {
3536
if (TextUtils.isEmpty(name))
3637
return false;
3738

39+
name = name.toLowerCase(US);
3840
for (String extension : MARKDOWN_EXTENSIONS)
3941
if (name.endsWith(extension))
4042
return true;

0 commit comments

Comments
 (0)