mirror of https://codeberg.org/gitnex/GitNex.git
Fix crash on viewing md files in file viewer with tabs and spaces (#1243)
Closes #1239 Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1243 Reviewed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
parent
3332749ff2
commit
06a7eb5a0c
|
@ -51,7 +51,11 @@ public abstract class Language {
|
|||
public static boolean isValid(String name) {
|
||||
initializeMap();
|
||||
|
||||
return languages.containsKey(name.toUpperCase());
|
||||
if (name != null) {
|
||||
return languages.containsKey(name.toUpperCase());
|
||||
} else {
|
||||
return languages.containsKey(null);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract Pattern getPattern(LanguageElement element);
|
||||
|
|
Loading…
Reference in New Issue