fix: improve markdown table row parsing by refining line trimming logic

This commit is contained in:
Mega Yu
2026-05-14 21:23:18 +08:00
parent a4497a39c7
commit cbbe6830e9

View File

@@ -393,8 +393,9 @@
(defn- split-markdown-table-row
[line]
(let [s (cond-> (string/trim line)
(string/starts-with? (string/trim line) "|") (subs 1))
(let [line' (string/trim line)
s (cond-> line'
(string/starts-with? line' "|") (subs 1))
trailing-pipe? (string/ends-with? s "|")]
(loop [idx 0
start 0