-
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Challenge fenced divs display as intended when they contain another fenced div, such as a Hint or Solution:
::::::::::::::::::::::::::::::::: challenge
### CHALLENGE
I look like a CHALLENGE.
::::::::::::::::: solution
### SOLUTION
I look like a SOLUTION.
::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::But if they do not contain another fenced div, they are rendered as a Discussion:
::::::::::::::::: discussion
### DISCUSSION
I really am a DISCUSSION.
::::::::::::::::::::::::::::
:::::::::::::::::: challenge
### CHALLENGE
But I look like a DISCUSSION.
::::::::::::::::::::::::::::As far as I can tell, this is because of the challenge_block function in lesson.lua, which contains the following lines:
sandpaper/inst/rmarkdown/lua/lesson.lua
Lines 578 to 581 in 84f602b
| if #this_challenge.content > 1 then | |
| bookend = pandoc.Div(this_challenge.content, {class = "discussion"}) | |
| challenge_train:insert(callout_block(bookend)) | |
| end |
Here, the challenge content is put in a div with the class "discussion". On the principle of least surprise, I would have thought the class should be "challenge".
Apologies if this is intended behaviour and I missed the documentation for it somewhere.
Metadata
Metadata
Assignees
Labels
No labels