shosetsuorg / extensions

Moved to gitlab: Shosetsu - Extensions - Universe
https://gitlab.com/shosetsuorg/extensions
GNU General Public License v3.0
58 stars 98 forks source link

Remove RoyalRoad author-forced paragraph indent/spacing #365

Closed TechnoJo4 closed 2 years ago

Doomsdayrs commented 2 years ago

Wait what is going on here?

TechnoJo4 commented 2 years ago

See these example chapters:

https://www.royalroad.com/fiction/46842/a-desolate-life/chapter/756699/chapter-1-lightstone-village

The author put empty paragraphs between every other paragraph, forcing paragraph spacing when the user may not want any (and 3x the paragraph spacing if the user has set their spacing to 1)

https://www.royalroad.com/fiction/35925/the-many-lives-of-cadence-lee/chapter/554540/chapter-one-first-death

The author has put whitespace at the start of every paragraph, forcing paragraph indent even if the user does not want any (and at least doubling the amount the user wants if the setting is at 1), + same as first example above

TechnoJo4 commented 2 years ago

Similar code already exists for ScribbleHub, though RoyalRoad's HTML is a bit more of a mess (and there's also forced paragraph indent to worry about) so the cleanup code is more complicated here.

Doomsdayrs commented 2 years ago

@TechnoJo4 You also forgot how to make commit messages

TechnoJo4 commented 2 years ago

Doesn't matter cause they're squashed but I fixed it anyways

please actually review the code now, i would very much like to use royalroad again soon without the formatting being ugly as hell

Doomsdayrs commented 2 years ago

I did.