foliant-docs / foliant

Comprehensive markdown-based documentation toolkit
https://foliant-docs.github.io/docs/
MIT License
160 stars 9 forks source link

Tag options suggestions #44

Closed Vanderhoof closed 5 years ago

Vanderhoof commented 6 years ago

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]}

Vanderhoof commented 5 years ago

Resolved in 1.0.9