You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While playing with revealjs-codeblock plugin i figured that it does not honor the line numbering attribute from pandoc startFrom=10 . I could add that with my very limited lua abilities by iterating over the code block attributes and add the attribute manually. Because of my lack of experience with lua I place my " solution " here, but dare not to create a pull request, the solution is suboptimal, because the code block attributes are now iterated twice.
function CodeBlock(block)
if FORMAT == 'revealjs' then
local css_classes = {}
local pre_tag_attributes = {}
local code_tag_attributes = {}
for _, class in ipairs(block.classes) do
if is_numberlines_class(class) then
if not is_data_line_number_in_attributes(block.attributes) then
table.insert(block.attributes, {'data-line-numbers', ''})
end
for _, attribute in ipairs(block.attributes) do
if attribute[1] == 'startFrom' then
table.insert(block.attributes, {'data-ln-start-from', attribute[2]})
end
end
else
table.insert(css_classes, class)
end
end
... continues
The text was updated successfully, but these errors were encountered:
While playing with revealjs-codeblock plugin i figured that it does not honor the line numbering attribute from pandoc
startFrom=10
. I could add that with my very limited lua abilities by iterating over the code block attributes and add the attribute manually. Because of my lack of experience with lua I place my " solution " here, but dare not to create a pull request, the solution is suboptimal, because the code block attributes are now iterated twice.The text was updated successfully, but these errors were encountered: