From 0f12ca600977b5b168d114a6d29eb523e20cac94 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 19 Oct 2019 05:41:25 +0000 Subject: [PATCH] driver: Do not accumulate marked-up text. The output engine accumulates lines of text into blocks and outputs them all at once. This doesn't currently work for text with markup, so this commit disables it. It might be better to make it work, hence this commit also adds an XXX marker. --- src/output/driver.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/output/driver.c b/src/output/driver.c index 82556c81d0..8e856222dc 100644 --- a/src/output/driver.c +++ b/src/output/driver.c @@ -194,7 +194,11 @@ defer_text (struct output_engine *e, struct output_item *item) if (!is_text_item (item)) return false; - enum text_item_type type = text_item_get_type (to_text_item (item)); + struct text_item *text_item = to_text_item (item); + if (text_item->markup) /* XXX */ + return false; + + enum text_item_type type = text_item_get_type (text_item); if (type != TEXT_ITEM_SYNTAX && type != TEXT_ITEM_LOG) return false; @@ -206,7 +210,7 @@ defer_text (struct output_engine *e, struct output_item *item) if (!ds_is_empty (&e->deferred_text)) ds_put_byte (&e->deferred_text, '\n'); - const char *text = text_item_get_text (to_text_item (item)); + const char *text = text_item_get_text (text_item); ds_put_cstr (&e->deferred_text, text); output_item_unref (item); -- 2.30.2