Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[perf] astpipeline - switch to jog in ::: detection #11912

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions src/resources/filters/normalize/astpipeline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,15 @@

function quarto_ast_pipeline()
local function warn_on_stray_triple_colons()
local function block_handler(block)
_quarto.ast.walk(block, {
Str = function(el)
return {
Str = function(el)
if string.match(el.text, ":::(:*)") then
local error_message =
"\nThe following string was found in the document: " .. el.text ..
"\nThis string was found in a block element with the following content:\n\n" .. pandoc.utils.stringify(block) ..
"\n\nThis usually indicates a problem with a fenced div in the document. Please check the document for errors."
warn(error_message)
end
end
})
end
return {
Para = block_handler,
Plain = block_handler,
end
}
end
return {
Expand Down
Loading