Skip to content

Commit

Permalink
Merge pull request #213 from MohamedRejeb/1.x
Browse files Browse the repository at this point in the history
Keep the code span compatible with the old tag name
  • Loading branch information
MohamedRejeb authored Mar 10, 2024
2 parents 60fb458 + ff4bc35 commit d7a4019
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ internal object RichTextStateHtmlParser : RichTextStateParser<String> {
)

private const val CodeSpanTagName = "code"
private const val OldCodeSpanTagName = "code-span"

/**
* Encodes HTML elements to [RichSpanStyle].
Expand All @@ -343,7 +344,7 @@ internal object RichTextStateHtmlParser : RichTextStateParser<String> {
when (tagName) {
"a" ->
RichSpanStyle.Link(url = attributes["href"].orEmpty())
CodeSpanTagName ->
CodeSpanTagName, OldCodeSpanTagName ->
RichSpanStyle.Code()
else ->
RichSpanStyle.Default
Expand Down

0 comments on commit d7a4019

Please sign in to comment.