In version 3.x, complex restrictions are added to the target table and the context (i.e.doc or body). To reproduce the issue, generate documentation with a restriction of the form:
This will list the constraints both within the relevant table, as well as immediately following it. The reason is the list comprehension and string join in _setclass_html in utils.py:
return raw(joining_word.join([mem.render() for mem in class_set]))
Since the elements in class_set are rendered and added only as text to raw they are never actually added to any element and will be added to the context when it closes. From the dominate docs:
When the context is closed, any nodes that were not already added to something get added to the current context.
In version 3.x, complex restrictions are added to the target table and the context (i.e.
doc
or body). To reproduce the issue, generate documentation with a restriction of the form:This will list the constraints both within the relevant table, as well as immediately following it. The reason is the list comprehension and string join in
_setclass_html
inutils.py
:Since the elements in
class_set
are rendered and added only as text toraw
they are never actually added to any element and will be added to the context when it closes. From the dominate docs: