Make a backward compatible docutils fix

THe fix for docutils 0.13 doesn't work with 0.12, obviously. This works
around the issue handling both version of the internal API.

Change-Id: I3bebb206a3205a6f3fa77a7844e50c2e090630a4
This commit is contained in:
Thomas Herve 2017-03-03 11:57:06 +01:00
parent 3c0362e24c
commit ae6711d661
1 changed files with 3 additions and 1 deletions

View File

@ -59,7 +59,9 @@ class TableFromText(Table):
tgroup = nodes.tgroup(max_cols)
table += tgroup
col_widths = self.get_column_widths(max_cols)[1]
col_widths = self.get_column_widths(max_cols)
if isinstance(col_widths, tuple):
col_widths = col_widths[1]
tgroup.extend(nodes.colspec(colwidth=col_width) for
col_width in col_widths)