if (i > 0)
ds_put_cstr (&s, "\n\n");
- ds_put_cstr (&s, c->text);
+ if (c->options & TAB_MARKUP)
+ {
+ char *t = output_get_text_from_markup (c->text);
+ ds_put_cstr (&s, t);
+ free (t);
+ }
+ else
+ ds_put_cstr (&s, c->text);
csv_format_footnotes (c->footnotes, c->n_footnotes, &s);
}
csv_output_field (csv, ds_cstr (&s));
enum text_item_type type = text_item_get_type (text_item);
const char *text = text_item_get_text (text_item);
- if (type == TEXT_ITEM_COMMAND_OPEN || type == TEXT_ITEM_COMMAND_CLOSE
- || type == TEXT_ITEM_SYNTAX || type == TEXT_ITEM_PAGE_TITLE)
+ if (type == TEXT_ITEM_SYNTAX || type == TEXT_ITEM_PAGE_TITLE)
return;
csv_put_separator (csv);
- csv_output_field (csv, text);
+ if (text_item->markup)
+ {
+ char *plain_text = output_get_text_from_markup (text);
+ csv_output_field (csv, plain_text);
+ free (plain_text);
+ }
+ else
+ csv_output_field (csv, text);
putc ('\n', csv->file);
}
else if (is_message_item (output_item))
{
const struct message_item *message_item = to_message_item (output_item);
- const struct msg *msg = message_item_get_msg (message_item);
- char *s = msg_to_string (msg, message_item->command_name);
+ char *s = msg_to_string (message_item_get_msg (message_item));
csv_put_separator (csv);
csv_output_field (csv, s);
free (s);