chrrs / scribble

Fabric mod to expertly edit your books with rich formatting options and page utilities
https://modrinth.com/mod/scribble
MIT License
3 stars 1 forks source link

Bug: Incorrect Formatting #19

Open wiskiw opened 2 weeks ago

wiskiw commented 2 weeks ago

Description

The book was written by the other player who used Stendhal mod.
And it looks different when I'm ussing Vanilla client and a client with Scribble mod installed.
Scribble Vanilla
Screenshot 2024-08-29 at 09 09 07 Screenshot 2024-08-29 at 09 08 53

Steps to Reproduce

  1. Install Scribble 1.2.2 - Fabric 1.21
  2. Load book from the broken.txt file (it's actually NBT file, but Git do not accept it).
  3. Compare with the book content with and without Scribble mod.

Expected Result

The book's content looks identical with and without Scribble mod.

Actual Result

The end of the second line has no bold formatting when I'm ussing Scribble.

chrrs commented 2 weeks ago

This one's because the weird rules around the RESET formatting code, and more of a bug in vanilla code than an issue in Scribble. I'm not really sure how to solve it though, since the behaviour messes with assumptions made in the Scribble code. (namely that text wrapping doesn't matter for formatting, which with RESET it does). The best way might be to just convert the book on opening and removing RESET codes with some special rules.