X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fhtml.c;h=644ef49eba9e84082141fc1d5ef1cbb917eb9231;hb=d55fbbb4fda554d02c93dd46c6fa66128060e6f0;hp=3f07adcfeebd1dd634d19ba55c296054a21f0e5b;hpb=f5ad0a140f581d9f72e2c498d294af76032b1a9c;p=pspp diff --git a/src/output/html.c b/src/output/html.c index 3f07adcfee..644ef49eba 100644 --- a/src/output/html.c +++ b/src/output/html.c @@ -586,17 +586,20 @@ html_put_table_cell (struct html_driver *html, const struct pivot_table *pt, if (cell->value->n_footnotes > 0) { fputs ("", html->file); + size_t n_footnotes = 0; for (size_t i = 0; i < cell->value->n_footnotes; i++) { - if (i > 0) - putc (',', html->file); - - size_t idx = cell->value->footnote_indexes[i]; - const struct pivot_footnote *f = pt->footnotes[idx]; + const struct pivot_footnote *f + = pt->footnotes[cell->value->footnote_indexes[i]]; + if (f->show) + { + if (n_footnotes++ > 0) + putc (',', html->file); - char *marker = pivot_footnote_marker_string (f, pt); - escape_string (html->file, marker, " ", "
"); - free (marker); + char *marker = pivot_footnote_marker_string (f, pt); + escape_string (html->file, marker, " ", "
"); + free (marker); + } } fputs ("
", html->file); }