Suggestion: Patterns
Closed this issue · 1 comments
DoubleF3lix commented
The addition of patterns would allow for de-duplication of modifier blocks.
An example of their usage is as follows:
@pattern_name = (color=#000000, bold, hover_text=<Basically /clone>)
Here is some [modified text](@pattern_name)
In this case, [modified text](@pattern_name)
is equivalent to [modified text](color=#000000, bold, hover_text=<Basically /clone>)
.
However, merging patterns and other modifiers is valid:
@pattern1 = (bold, italic)
@pattern2 = (underlined, bold=false)
More [text](@pattern1, @pattern2, link="https://example.com")
Patterns should be applied in order that they are listed in, from left to right.
In this case, [text](@pattern1, @pattern2, https://example.com)
is equivalent to [text](italic, underlined, link="https://example.com")
, as the bold
modifier in @pattern1
is overridden by @pattern2
.
DoubleF3lix commented
Done