Fix converter state not being reset
This commit is contained in:
parent
b33be0f178
commit
64b68a6cec
|
@ -45,6 +45,8 @@ public struct AttributedStringConverter<Callbacks: HTMLConversionCallbacks> {
|
|||
|
||||
actionStack = []
|
||||
styleStack = []
|
||||
previouslyFinishedBlockElement = false
|
||||
currentElementIsEmpty = true
|
||||
currentRun = ""
|
||||
|
||||
while let token = tokenizer.next() {
|
||||
|
|
|
@ -31,6 +31,10 @@ public struct TextConverter<Callbacks: HTMLConversionCallbacks> {
|
|||
tokenizer = Tokenizer(chars: html.unicodeScalars.makeIterator())
|
||||
str = ""
|
||||
|
||||
previouslyFinishedBlockElement = false
|
||||
currentElementIsEmpty = true
|
||||
currentRun = ""
|
||||
|
||||
while let token = tokenizer.next() {
|
||||
switch token {
|
||||
case .character(let scalar):
|
||||
|
|
Loading…
Reference in New Issue