From 1fdd8bb183552338cfcb4fc743e045e2e8fcde72 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 3 Nov 2017 16:32:06 +0000 Subject: [PATCH] Fix some trailing whitespace --- templating/matrix_templates/templates/tables.tmpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templating/matrix_templates/templates/tables.tmpl b/templating/matrix_templates/templates/tables.tmpl index bd25a156..d62a4259 100644 --- a/templating/matrix_templates/templates/tables.tmpl +++ b/templating/matrix_templates/templates/tables.tmpl @@ -20,7 +20,7 @@ # As a special case, if a key of 'rows_by_loc' is 'None', no title row is # written for that location. This is used by the standard 'paramtable' macro. #} -{% macro split_paramtable(rows_by_loc, +{% macro split_paramtable(rows_by_loc, titles=["Parameter", "Type", "Description"]) -%} {% set rowkeys = ['key', 'type', 'desc'] %} @@ -33,7 +33,7 @@ {# Figure out the widths of the columns. The last column is always 50 characters # wide; the others default to 10, but stretch if there is wider text in the # column. -#} -{% set fieldwidths = (([titlerow] + flatrows) | +{% set fieldwidths = (([titlerow] + flatrows) | fieldwidths(rowkeys[0:-1], [10, 10])) + [50] -%} {{ tableheader(fieldwidths) }} @@ -56,7 +56,7 @@ {# - # Write a table header row, for the given column widths + # Write a table header row, for the given column widths #} {% macro tableheader(widths) -%} {% for arg in widths -%} @@ -66,7 +66,7 @@ {# - # Write a normal table row. Each of 'widths' and 'keys' should be sequences + # Write a normal table row. Each of 'widths' and 'keys' should be sequences # of the same length; 'widths' defines the column widths, and 'keys' the # attributes of 'row' to look up for values to put in the columns. #} @@ -80,7 +80,7 @@ {# the last column needs wrapping and indenting (by the sum of the widths of the preceding columns, plus the number of preceding columns (for the separators)) -#} - {{ value | wrap(widths[loop.index0]) | + {{ value | wrap(widths[loop.index0]) | indent_block(widths[0:-1]|sum + loop.index0) -}} {% endif -%} {% endfor -%} @@ -89,7 +89,7 @@ -{# +{# # write a tablespan row. This is a single value which spans the entire table. #} {% macro tablespan(widths, value) -%}