Skip to content

Commit

Permalink
fix: line break unhandled event (WPB-3320) (#2046)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandre Ferris <ferris.alexandre@gmail.com>
  • Loading branch information
github-actions[bot] and alexandreferris committed Aug 2, 2023
1 parent 7503f6f commit 044c34e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import org.commonmark.node.Link
import org.commonmark.node.Node
import org.commonmark.node.OrderedList
import org.commonmark.node.Paragraph
import org.commonmark.node.SoftLineBreak
import org.commonmark.node.StrongEmphasis
import org.commonmark.node.Text
import org.commonmark.node.ThematicBreak
Expand Down Expand Up @@ -158,9 +159,8 @@ fun inlineChildren(
annotatedString.pop()
}

is HardLineBreak -> {
is HardLineBreak, is SoftLineBreak -> {
annotatedString.append("\n")
annotatedString.pop()
}

is Link -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ fun Resources.annotatedText(
else -> {
pushStyle(style = toSpanStyle(normalStyle, useErrorColorIfApplies(isErrorString, errorColor, normalColor)))
append(piece)
pop()
}
}
}
Expand Down

0 comments on commit 044c34e

Please sign in to comment.