Skip to content

Commit 220b58b

Browse files
committed
only reset format after a standalone line break
1 parent e4d2d81 commit 220b58b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/cleanroommc/modularui/drawable/text/RichTextCompiler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public void reset(FontRenderer fr, int maxWidth) {
5454

5555
private void compile(List<Object> raw) {
5656
for (Object o : raw) {
57-
this.formatting.reset();
5857
if (o instanceof ITextLine line) {
5958
newLine();
6059
lines.add(line);
@@ -69,6 +68,7 @@ private void compile(List<Object> raw) {
6968
}
7069
if (key == IKey.LINE_FEED) {
7170
newLine();
71+
this.formatting.reset();
7272
continue;
7373
}
7474
text = key.getFormatted();

0 commit comments

Comments
 (0)