File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ proc renderNoteParagraph(articleParagraph: ArticleParagraph; article: Article; t
71
71
72
72
proc flushInternal (start: int , len: int , style: int ): void =
73
73
let content = text.runeSubStr (start, len).replaceHashtagsAndMentions
74
- echo content, " , " , style
75
74
if style == 0 :
76
75
target.add text content
77
76
else :
@@ -108,11 +107,13 @@ proc renderNoteParagraph(articleParagraph: ArticleParagraph; article: Article; t
108
107
else : discard
109
108
110
109
if style != lastStyle:
111
- flushInternal (lastStart, i - lastStart, lastStyle)
112
-
110
+ if i > lastStart:
111
+ flushInternal (lastStart, i - lastStart - 1 , lastStyle)
112
+ lastStart = i - 1
113
+ else :
114
+ lastStart = i
113
115
lastStyle = style
114
- lastStart = i
115
-
116
+
116
117
if lastStart < len:
117
118
flushInternal (lastStart, len - lastStart, lastStyle)
118
119
You can’t perform that action at this time.
0 commit comments