sphinx-needs
sphinx-needs copied to clipboard
filter strings multiline
When giving a filter string to a need, most seem to be one-liners. Sometimes it is required to give more complex filter strings, maybe with one or more and or or parts.
For readability it is helpful to have this lines as multiline filter strings, but this is not possible if the syntax breaks at the first line. Maybe this could be fixed cause other options support multiple lines.
Example:
.. needtable::
:style: table
:filter: id in ['a','b','c','d','e','f','g'] or
id.startswith("h")
For complex filter logic, you can use the filter-code or filter-function method. See: https://sphinx-needs.readthedocs.io/en/latest/filter.html#filter-code
I think this would fulfill your requirements.
:+1: https://sphinx-needs.readthedocs.io/en/latest/filter.html#filter-code