Skip to content
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