Carpet

Carpet

2M Downloads

[Suggestion] Markdown support in Rule descriptions

RubixDev opened this issue ยท 4 comments

commented

I thought of basic markdown support for the rule descriptions, so things like this would display properly ingame and maybe being able to write in bold and italic.

commented

+1, although probably not simple, would be nice to link at least bug reports. Maybe instead hardcoding bug reports would be simpler, since I'm not sure what else would you need to link, and a markdown processor may be too complex for that single purpose. Edit: I've just seen that your use case is linking sources for the idea of rules, so maybe there are more cases. Actually not, those are not Validator descriptions but from your parser, nvm.

Also Github embed of those lines, for the lazy:

desc = "Lightning kills the items that drop when lightning kills an entity",
extra = {"Setting to true will prevent lightning from killing drops", "Fixes [MC-206922](https://bugs.mojang.com/browse/MC-206922)."},
category = {BUGFIX}

commented

hmm, maybe with the system already used in format() function or smth?

commented

Any markdown thing would have to be added to that, before it gets translated. In all instances of a rule description being displayed to the player, that appears to be the method used to get it (which makes sense if u think about it)

public String translatedDescription()
{
return tr(String.format("rule.%s.desc", (name)), description);
}

commented

mmmmmm...
primary reason for these messages is to display them properly in chat. Markdown is secondary. That would be a lot of work for very little benefits.