else if (is_text_item (output_item))
{
struct text_item *text_item = to_text_item (output_item);
- const char *s = text_item_get_text (text_item);
+ char *s = text_item_get_plain_text (text_item);
switch (text_item_get_type (text_item))
{
fprintf (html->file, "</p>\n");
break;
}
+
+ free (s);
}
else if (is_message_item (output_item))
{
if (cell->value->n_footnotes > 0)
{
fputs ("<sup>", 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, " ", "<br>");
- free (marker);
+ char *marker = pivot_footnote_marker_string (f, pt);
+ escape_string (html->file, marker, " ", "<br>");
+ free (marker);
+ }
}
fputs ("</sup>", html->file);
}