mirror of
https://github.com/ouchadam/small-talk.git
synced 2025-02-07 07:47:09 +01:00
handle apos; html entity
This commit is contained in:
parent
58730470f6
commit
1bfc2fd670
@ -56,7 +56,7 @@ class RichMessageParser {
|
||||
|
||||
}
|
||||
|
||||
private fun String.removeHtmlEntities() = this.replace(""", "\"").replace("'", "'")
|
||||
private fun String.removeHtmlEntities() = this.replace(""", "\"").replace("'", "'").replace("'", "'")
|
||||
|
||||
private fun String.dropTextFallback() = this.lines()
|
||||
.dropWhile { it.startsWith("> ") || it.isEmpty() }
|
||||
|
@ -38,8 +38,14 @@ class RichMessageParserTest {
|
||||
|
||||
@Test
|
||||
fun `replaces apostrophe entity`() = runParserTest(
|
||||
input = "Hello world! foo's bar",
|
||||
expected = RichText(listOf(Normal("Hello world! foo's bar")))
|
||||
Case(
|
||||
input = "Hello world! foo's bar",
|
||||
expected = RichText(listOf(Normal("Hello world! foo's bar")))
|
||||
),
|
||||
Case(
|
||||
input = "Hello world! foo's bar",
|
||||
expected = RichText(listOf(Normal("Hello world! foo's bar")))
|
||||
),
|
||||
)
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user