From fd28199178b5ba41cba6b2c72ce432379e9c7454 Mon Sep 17 00:00:00 2001 From: Feoramund <161657516+Feoramund@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:59:46 -0400 Subject: [PATCH] Optimize printing of markdown tables Check only once if the table has a header row, instead of every row. --- core/text/table/table.odin | 57 +++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/core/text/table/table.odin b/core/text/table/table.odin index 1fbd665ef..d555c3fe8 100644 --- a/core/text/table/table.odin +++ b/core/text/table/table.odin @@ -324,9 +324,8 @@ write_markdown_table :: proc(w: io.Writer, tbl: ^Table) { build(tbl, WIDTH_PROC) } - for row in 0..