-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make </>
close latest open tag in the tree
#994
Comments
I'm actually not really a fan of this. I think it makes the format look messy and introduces a kinda lack of clarity. Would be interested to hear what others think. |
I am working on an Intellij plugin and already ran into issues with the syntax, since xml uses ':' for namespaces while MiniMessage uses it to separate args. When defining xml based languages there are a lot of features like tag matching and synchronization and highlighting that work based on the tag name, which would not be found in </>. A lot would need to be rewritten just to support that closing tag while moving MiniMessage further away from well formed xml. And also if you don't like the |
The problem is that sometimes MiniMessage requires you to write like 2x the text you wrote, which is kinda frustrating without using the WebUI. And even with WebUI it becomes quite a routine to copy-paste text over and over. The examples in the initial post aren't perfect - I just wanted to show it for better understanding of a concept. I'd say the best use of
seems quite good-looking, but that's just an imho. |
I mean, as you've already mentioned, MiniMessage is already not XML compatible. I don't see it as an issue with MiniMessage.
That's just one case out. But it will colorize the comma in the middle of the sentence (which is obviously fixable, but will look quite weird). |
Whatever the decision here, I don't think "ease of writing an intellij language plugin" should be a deciding factor. I do like giving options to shorten the language, but I feel like it could get confusing which tag is being closed, and i'm not sure if adding more options helps or hurts overall. |
I did not mean to bring the "ease of writing an intellij language plugin" as an argument but wanted to emphasize that it has advantages to stay close to XML. XML is an absolute standard thats used for so many things but i don't know of any dialect that includes HTML is a dialect thats pretty close to MiniMessage, since it serves the same purpose of formatting raw text. Still, they explicitly close tags and don't use A pretty easy way to shorten the language and that I use within my code is a table with rules like MiniMessage is the language definition and parser while further software could add things like that. |
Yes, I think this is the reason why I'm mostly against |
But that's the developer side of things, not the user one. Custom tags are cool and stuff, but are not doable without some configurable implementation of those by a developer. And while configurable tag-placeholders are easy to implement, I can't say so for styling ones without some weird workarounds.
That's the thing - |
Okay maybe this one will convince you: using |
this is the typical easier to write vs easier to read kinda stuff, you read stuff way more often than you are writing it, so I don't see a reason to sacrifice the readability here. |
I thought about it because I made a translation file framework based on MiniMessage. What I chose instead was having more "functional" tags, like primary = "<#ffaaaa><slot/>"
url = "<blue><ul><hover:...><click:...><slot/>" my.message =" <url>https://my.server.url/<url>" |
I've been using a similar to MM format recently, and it had syntax like this
<first>First <second>first+second</> still first</> plain
, which was actually pretty handy to use.While it might sometimes be confusing when used in a very nested scenario, it removes a burrow to type long tags multiple times just to close them, doesn't hurt in linear cases, and is easier to look at when multiple hex colors are used.
A simple use-case
Another
Russian proverb for remembering the colors of the rainbow (yeah, our rainbow is a bit different lol)
The text was updated successfully, but these errors were encountered: