Skip to content

Commit a1badd7

Browse files
authored
Merge pull request #11912 from quarto-dev/perf/astpipeline-colons-jog
[perf] astpipeline - switch to jog in ::: detection
2 parents d6e562a + a44483c commit a1badd7

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/resources/filters/normalize/astpipeline.lua

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,15 @@
33

44
function quarto_ast_pipeline()
55
local function warn_on_stray_triple_colons()
6-
local function block_handler(block)
7-
_quarto.ast.walk(block, {
8-
Str = function(el)
6+
return {
7+
Str = function(el)
98
if string.match(el.text, ":::(:*)") then
109
local error_message =
1110
"\nThe following string was found in the document: " .. el.text ..
12-
"\nThis string was found in a block element with the following content:\n\n" .. pandoc.utils.stringify(block) ..
1311
"\n\nThis usually indicates a problem with a fenced div in the document. Please check the document for errors."
1412
warn(error_message)
1513
end
16-
end
17-
})
18-
end
19-
return {
20-
Para = block_handler,
21-
Plain = block_handler,
14+
end
2215
}
2316
end
2417
return {

0 commit comments

Comments
 (0)