Skip to content

Commit

Permalink
Use plain table rather than pandoc.List
Browse files Browse the repository at this point in the history
Fixes non-deterministic crashes observed when calling isHighlightClass (after updating to Pandoc 2.17)
  • Loading branch information
jjallaire committed Jan 14, 2022
1 parent c51e6d3 commit ee12f24
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/resources/filters/quarto-pre/engine-escape.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function engineLang(lang)
end
end

local kHighlightClasses = pandoc.List({
local kHighlightClasses = {
"abc",
"actionscript",
"ada",
Expand Down Expand Up @@ -181,8 +181,13 @@ local kHighlightClasses = pandoc.List({
"yacc",
"yaml",
"zsh"
})
}

function isHighlightClass(class)
return kHighlightClasses:includes(class)
for _, v in ipairs (kHighlightClasses) do
if v == class then
return true
end
end
return false
end

0 comments on commit ee12f24

Please sign in to comment.