- /* XXX apply different styles based on text_item's type. */
- odt_output_text (odt, text_item_get_text (to_text_item (output_item)));
+ struct text_item *text_item = to_text_item (output_item);
+
+ if (text_item_get_type (text_item) != TEXT_ITEM_COMMAND_CLOSE)
+ odt_output_text (odt, text_item_get_text (text_item));