Skip to content

Commit 0d28a8a

Browse files
committed
html tables - remove trailing spaces in HTML raw block before parsing
This prevent creating a HTML RawBlock with only newlines after the table element
1 parent 19f2728 commit 0d28a8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/resources/filters/normalize/astpipeline.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ function quarto_ast_pipeline()
112112
end
113113
local function handle_raw_html_as_table(el)
114114
local eltext
115+
-- trim leading and trailing spaces
116+
el.text = el.text:gsub("^%s*(.-)%s*$", "%1")
117+
115118
if(_quarto.format.isTypstOutput()) then
116119
eltext = juice(el.text)
117120
else

0 commit comments

Comments
 (0)