Foliant's tags options are HTML-like:
<tag option="value"></tag>
HTML also supports single-quote syntax:
<tag option='value'></tag>
But foliant tags don't. It means that there's no way I can pass a string with doublequotes in options or a string with JSON in it.
I think we should add single-quote options support.
2. Array values support
Sometimes it is necessary to pass an array value in the tag. You can, for example, pass a string with delimiters and then split it into values but it is inconsistent and has to be specified for each preprocessor separately.
I suggest a more consistent way. If the same option key is stated several times in the tag — assume that it is an array:
1. Single-quote syntax support
Foliant's tags options are HTML-like:
<tag option="value"></tag>
HTML also supports single-quote syntax:
<tag option='value'></tag>
But foliant tags don't. It means that there's no way I can pass a string with doublequotes in options or a string with JSON in it.
I think we should add single-quote options support.
2. Array values support
Sometimes it is necessary to pass an array value in the tag. You can, for example, pass a string with delimiters and then split it into values but it is inconsistent and has to be specified for each preprocessor separately.
I suggest a more consistent way. If the same option key is stated several times in the tag — assume that it is an array:
<tag array=1 array=2 array=3> </tag>
returning options:
{'array': [1,2,3]}