From 3698f8cf90b9ae1a2d536be0eef2ea97ee65272b Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 10 Dec 2022 10:22:26 -1000 Subject: [PATCH] fix: balcmds: the table layout in HTML output with --layout=bare --- hledger/Hledger/Cli/CompoundBalanceCommand.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hledger/Hledger/Cli/CompoundBalanceCommand.hs b/hledger/Hledger/Cli/CompoundBalanceCommand.hs index 440a44eb1..a3f962133 100644 --- a/hledger/Hledger/Cli/CompoundBalanceCommand.hs +++ b/hledger/Hledger/Cli/CompoundBalanceCommand.hs @@ -279,8 +279,13 @@ compoundBalanceReportAsHtml :: ReportOpts -> CompoundPeriodicReport DisplayName compoundBalanceReportAsHtml ropts cbr = let CompoundPeriodicReport title colspans subreports netrow = cbr - colspanattr = colspan_ $ T.pack $ show $ - 1 + length colspans + (if row_total_ ropts then 1 else 0) + (if average_ ropts then 1 else 0) + colspanattr = colspan_ $ T.pack $ show $ sum [ + 1, + length colspans, + if row_total_ ropts then 1 else 0, + if average_ ropts then 1 else 0, + if layout_ ropts == LayoutBare then 1 else 0 + ] leftattr = style_ "text-align:left" blankrow = tr_ $ td_ [colspanattr] $ toHtmlRaw (" "::String)