The color discussion is worth having, too, though. I don’t object if they’re commingled. The basic question is simply how do we make filter examples in the docs wiki more clear.
I’m wondering if the best bet would be to introduce new widgets that would allow us to parse and format filters in a universal way. The range Operator
starts like this:
The `range` operator produces a list of numbers counting up or down. It is useful for counting and numbering.
<<.from-version "5.2.0">> The range operator has been updated to use multiple parameters. Prior to this version, the range operator only had one parameter, with the three parts delimited by `,`, `;` or `:`.
```
[range[<begin>]]
[range[<begin>],[<end>]]
[range[<begin>],[<end>],[<step>]]
```
The behaviour depends on the number of parameters:
|Parameter |Output |h
|`<end>` |Whole numbers up to `<end>` |
|`<begin>,<end>` |Numbers from `<begin>` to `<end>`, spaced by whole numbers |
|`<begin>,<end>,<step>` |Numbers from `<begin>` to `<end>` spaced out by `<step>` |
But I’m thinking that we could perhaps do this:
The `range` operator produces a list of numbers counting up or down. It is useful for counting and numbering.
<<.from-version "5.2.0">> The range operator has been updated to use multiple parameters. Prior to this version, the range operator only had one parameter, with the three parts delimited by `,`, `;` or `:`.
<$docs.filters>
[range«begin»]
[range«begin»,«end»]
[range«begin»,«end»,«step»]
</docs.filters>
The behaviour depends on the number of parameters:
|Parameter |Output |h
|<$docs.filter>«end»></$docs.filter> |Whole numbers up to <$docs.filter>«end»></$docs.filter> |
|<$docs.filter>«begin»></$docs.filter> docs.filter «end»>> |Numbers from <$docs.filter>«begin»></$docs.filter> to <$docs.filter>«end»></$docs.filter> , spaced by whole numbers |
|<$docs.filter>«begin»></$docs.filter>,<$docs.filter>«end»></$docs.filter>,<$docs.filter>«step»></$docs.filter> |Numbers from <$docs.filter>«begin»></$docs.filter> to <$docs.filter>«end»></$docs.filter> spaced out by <$docs.filter>«step»></$docs.filter> |
And then the highlight module (or prismjs, if that won’t work) would be used to set colors, fonts and other styles for our filters.
But I still think that an unambiguous bracket not used by TW would help demonstrate that we mean any of the different possible brackets. Since these would be used only for syntax description and not for specific examples, I don’t think it would add much confusion, and I think it would clear up some current confusion… That’s why I used, for instance, «begin»>
above.