🚀 Add ".MD" file format
* Added support for markdown file format (.md)
This commit is contained in:
parent
98ad641b9b
commit
abc276a35d
3 changed files with 10 additions and 1 deletions
|
|
@ -55,6 +55,10 @@ class FileParserImpl @Inject constructor(
|
|||
htmlFileParser.parse(file)
|
||||
}
|
||||
|
||||
".md" -> {
|
||||
txtFileParser.parse(file)
|
||||
}
|
||||
|
||||
else -> {
|
||||
Log.e(FILE_PARSER, "Wrong file format, could not find supported extension.")
|
||||
null
|
||||
|
|
|
|||
|
|
@ -60,6 +60,10 @@ class TextParserImpl @Inject constructor(
|
|||
htmlTextParser.parse(file)
|
||||
}
|
||||
|
||||
".md" -> {
|
||||
htmlTextParser.parse(file)
|
||||
}
|
||||
|
||||
else -> {
|
||||
Log.e(TEXT_PARSER, "Wrong file format, could not find supported extension.")
|
||||
Resource.Error(UIText.StringResource(R.string.error_wrong_file_format))
|
||||
|
|
|
|||
|
|
@ -7,5 +7,6 @@ fun Constants.provideSupportedExtensions() = listOf(
|
|||
".txt",
|
||||
".zip",
|
||||
".html",
|
||||
".htm"
|
||||
".htm",
|
||||
".md"
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue