GTNewHorizons / ServerUtilities

GNU Lesser General Public License v3.0
27 stars 12 forks source link

Fix chat formatting parsing #84

Closed Lyfts closed 2 months ago

Lyfts commented 2 months ago

Supersedes https://github.com/GTNewHorizons/ServerUtilities/pull/83 and Closes https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/16422

Fixes the problem by not trying to apply formatting if there is no valid one. Also stops "**" and "****" from being replaced if there are no characters in between the asterisks.

Beforehand bold and italics couldn't be present in the same string so for the funsies I made it accept nested formatting so that "\~\~**{*Insert string here*}**\\" will be strikethrough, bold and italics.~~ Nvm that worked without the brackets before lol.