Skip to content

Commit

Permalink
Change tab component header syntax to match other components and add …
Browse files Browse the repository at this point in the history
…support for lists
  • Loading branch information
astroDimitrios committed Mar 6, 2024
1 parent 9986a93 commit 7b3c741
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions inst/rmarkdown/lua/lesson.lua
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ end

tab_filter = {
Header = function(el)
-- Level 1 headers mark the tab titles
-- Level 3 headers mark the tab titles
-- all other headers in a tab block are ignored
if el.level == 1 then
if el.level == 3 then

-- Insert the title for the add_to_tabpanel to access
local title = pandoc.utils.stringify(el)
Expand Down Expand Up @@ -419,6 +419,12 @@ tab_filter = {
end,
CodeBlock = function(el)
_ = add_to_tabpanel(el)
end,
OrderedList = function(el)
_ = add_to_tabpanel(el)
end,
BulletList = function(el)
_ = add_to_tabpanel(el)
end
}

Expand Down

0 comments on commit 7b3c741

Please sign in to comment.