table fixes

This commit is contained in:
Luxferre
2026-10-14 14:15:14 +03:00
parent 05bce7ca9c
commit 105d283e01
2 changed files with 27 additions and 1 deletions
+4 -1
View File
@@ -258,7 +258,10 @@ static void stream_handle_data(StreamCtx *sc, const std::string &data) {
if (nl == std::string::npos) break;
std::string cur = sc->line_buf.substr(0, nl);
sc->line_buf.erase(0, nl + 1);
if (!sc->md.in_code && !is_table_line(cur)) {
/* Inside a code block every line is rendered verbatim as code; only
* outside a code block do table-shaped lines get accumulated for
* box-drawing table rendering. */
if (sc->md.in_code || !is_table_line(cur)) {
flush_tbl(sc);
render_md_line_print(cur, sc->md);
} else {