Skip to content
Snippets Groups Projects
Commit 1bb43562 authored by Jay Rainey's avatar Jay Rainey
Browse files

Fix bug in properties directive. Refs #9585.

- If a property had all empty field for a specific argument then the table would not be built.
parent c756c0c6
No related branches found
No related tags found
No related merge requests found
......@@ -65,8 +65,11 @@ class PropertiesDirective(BaseDirective):
'Name', 'Direction', 'Type', 'Default', 'Description')
# The width of the columns. Multiply row length by 10 to ensure small
# properties format correctly.
col_sizes = [max(len(row[i] * 10) for row in table_content)
for i in range(len(header_content))]
# Added 10 to the length to ensure if table_content is 0 that
# the table is still displayed.
col_sizes = [max( (len(row[i] * 10) + 10) for row in table_content)
for i in range(len(header_content))]
# Use the column widths as a means to formatting columns.
formatter = ' '.join('{%d:<%d}' % (index,col) for index, col in enumerate(col_sizes))
# Add whitespace to each column. This depends on the values returned by
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment