Skip to content
Snippets Groups Projects
Commit 292493f1 authored by Taras's avatar Taras
Browse files

Formatting

parent 64fd6c1d
No related branches found
No related tags found
No related merge requests found
......@@ -380,7 +380,7 @@ class PreviewPostView(
//To remove extra space between word and markdown char (__aaa __*b* -> __aaa__ *b*)
private fun EditorEditText.getFormattedMarkdown(): String = getMarkdown()
.replace("__","**")
.replace("__", "**")
.replace(Regex("\\*\\*(\\S+(?:\\s\\S+)*) \\*\\*"), "**$1** ")
.replace(Regex("\\*(\\S+(?:\\s\\S+)*) \\*"), "*$1* ")
.replace(Regex("~~(\\S+(?:\\s\\S+)*) ~~"), "~~$1~~ ")
......@@ -392,6 +392,4 @@ class PreviewPostView(
setMarkdown(formattedMessage)
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment