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

[pull] main from carpentries:main #20

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# sandpaper 0.16.5.9000 (2024-04-19)

## BUG FIXES

* Fix for empty divs when checking for headers
(reported: @dmgatti, #581; fixed @froggleston)


# sandpaper 0.16.4 (2024-04-10)

## NEW FEATURES
Expand Down
5 changes: 5 additions & 0 deletions inst/rmarkdown/lua/lesson.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ function level_head(el, level)
local id = 1
local header = el.content[id]

-- fix for https://github.com/carpentries/sandpaper/issues/581
if header == nil then
return el
end

if level ~= 0 and header.level == nil then
-- capitalize the first letter and insert it at the top of the block
local C = text.upper(text.sub(class, 1, 1))
Expand Down
Loading