Textarea @var config type
Use case:
- Entering a list of items
For example, https://userstyles.world/style/9719 provides a 'text' var to generate a set of title match rules. Using 'text' means that list looks like 'Game Name 1, Game Name 2, Game Name 3' in a small single line entry.
From what I could tell, supporting a textarea type would be the most expedient way to improve this situation.
I tried to do it myself and got some of the way there, but could not wrap my head around the parser rules and how to handle an unquoted list with newlines. I might be able to finish it if there was some reference for that I could read or explanation of the surrounding system.
Side note, I didn't even know style var/configs existed before now, that's cool.
I think a more universal/compatible solution is to always show a textarea in the config and a button nearby that opens it in a new bigger modal. It'll support and preserve linebreaks, which in other userstyle extensions would be converted into normal whitespace by the <input> element automatically.
@eight04?
It'll support and preserve linebreaks
This may break the compiler. The compiler probably won't work with variables containing \n.
Well, then we'll save them in an escaped form or by replacing with some special character so that it doesn't break other tools/extensions.
OTOH this seems to be already handled correctly in usercss-meta: parseStringToEnd calls unquote() that unescapes as well.