Closed nemesifier closed 4 months ago
It does not like the nested table. This is a case I hadn't considered.
Try increasing the width or manually edit the nested table to better fit. I'll leave this open because it should be fixed but this is the first case I've seen a nested table and it should theoretically work but it'll need some special handleing. Unlike merged rows, I don't want to not support this use case.
Yeah, I think nested tables won't be easy to support. Docstrfmt has an auto sizing algorithm that doesn't work with nested tables either. I recommend switching many of your tables to a field list like this:
:attribute_1 str: Description for attribute 1.
:attribute_2 str: Description for attribute 2
:attribute_3 str: Description for attribute 3
This will also allow for your attribute tables to be more fluid and formatted in a format that is easier to maintain and edit.
@LilSpazJoekp at the moment I would be happy with getting a more informative error message. Can we make it spit out at which line is failing?
Yes it is failing here: https://github.com/openwisp/openwisp-utils/blob/master/README.rst?plain=1#L450
Oh I misread your comment. Let me see if I that is avaliable at the point of failure.
Disregard literally everything I just said. I was able to fix it to support nested tables. Will release a fix for it soon.
Trying to run the latest version on this README: https://github.com/openwisp/openwisp-utils/blob/master/README.rst
I see this error:
I don't understand exactly what's going on. It seems there's one line which triggers this. Sometimes errors pop up but there's no indication of what line is causing them.
Funny thing is that removing the
--check
option allows the file to be reformatted successfully.