Closed trhallam closed 1 month ago
I had the same issue, but only on my machine. I think it still happens locally, but somehow it does not affect the online website; that shows everything as it should be. See carpentries/sandpaper#470 for some discussion.
Do you see that it happens online too (if you use the standard workflows with GitHub Actions)?
HI @trhallam, I am afraid I cannot reproduce this behaviour.
I have created an example in https://zkamvar.github.io/test-workbench-59/#being-certain-which-system-your-terminal-is-connected-to and it appears to work correctly.
Would you mind providing a little more information by providing the output of sessioninfo::session_info()
after you build the lesson? This would give me more information regarding your version of R and pandoc and where your version of {sandpaper} is coming from (see https://github.com/carpentries/sandpaper/issues/470#issuecomment-1561371631 for an example of what the output looks like).
And I apologise for not replying sooner. The last quarter has been nothing but chaos š
I had the same issue, but only on my machine. I think it still happens locally, but somehow it does not affect the online website; that shows everything as it should be. See carpentries/sandpaper#470 for some discussion.
Do you see that it happens online too (if you use the standard workflows with GitHub Actions)?
This appears to be correct. For some reason the locally built version has the capitalised text while for the Github Actions output it does not. For example.
And I apologise for not replying sooner. The last quarter has been nothing but chaos š
Not a problem @zkamvar , the lesson was fine in the end, and I know I'm migrating content across as an early adopter. I had quite a few comments on the design from students which I will put in another issue.
I am using the docker-serve method to work on my lessons but here is the output of session_info()
I did see that the test's snapshot includes the callout-title
class on the <div>
where it shouldn't be.
When I modify that snapshot manually and run the test suite, the test fails because the callout-title
is added back. test-render_html.R
does not check explicitly that the <div>
does not have the class.
The callout-title
class is also present on <div>
elements in lines 11 and 23 of
All of this still does not explain why the behaviour cannot be reproduced or why local build output is different from GitHub build output. š
Thank you for posting your Session Information, @trhallam! I can now reproduce the behaviour! The source of the change is pandoc. We use 2.19.2 to build lessons on GitHub, but officially we support any version later than 2.11.4, which includes version 3.1.3, as you have in your session info: pandoc 3.1.3 @ /usr/bin/ (via rmarkdown)
I can now reproduce the behavior:
lsn <- usethis::create_from_github("zkamvar/test-workbench-59", destdir = tempdir())
#> ā¹ Defaulting to 'https' Git protocol
#> ā Setting `fork = FALSE`
#> ā Creating '/tmp/Rtmp24N1j4/test-workbench-59/'
#> ā Cloning repo from 'https://github.com/zkamvar/test-workbench-59.git' into '/tmp/Rtmp24N1j4/test-workbench-59'
#> ā Setting active project to '/tmp/Rtmp24N1j4/test-workbench-59'
#> ā¹ Default branch is 'main'
#> ā Setting active project to '<no active project>'
pandoc::pandoc_activate("3.1.3")
#> ā Version '3.1.3' is now the active one.
#> ā¹ Pandoc version also activated for rmarkdown functions.
sandpaper::build_lesson(lsn, quiet = TRUE, preview = FALSE)
idx <- xml2::read_html(fs::path(lsn, "site/docs/index.html"))
xml2::xml_find_first(idx, ".//div[starts-with(@class, 'callout')]") |> as.character() |> writeLines()
#> <div id="callout1" class="callout">
#> <div class="callout-square">
#> <i class="callout-icon" data-feather="bell"></i>
#> </div>
#> <div class="section level3 callout-title callout-inner">
#> <h3 class="callout-title" id="being-certain-which-system-your-terminal-is-connected-to">Being certain which system your terminal is
#> connected to<a class="anchor" aria-label="anchor" href="#being-certain-which-system-your-terminal-is-connected-to"></a>
#> </h3>
#> <div class="callout-content">
#> <p>If you ever need to be certain which system a terminal you are using
#> is connected to then use the following command:
#> <code>$ hostname</code>.</p>
#> </div>
#> </div>
#> </div>
Created on 2023-07-21 with reprex v2.0.2
I believe it's coming from this part of the lua filter where we place the callout header (which has the "callout-title" class) inside of the "callout-inner" block:
Now that I know what to look for I can make sure it's patched before lessons are deployed via pandoc 3.
Cool, thanks for following up!
This is now resolved in https://github.com/carpentries/workbench/issues/81
I'm currently migrating a lesson to the new workbench template and it appears that all of the callout markup is Uppercase and Underlined.
This doesn't reflect the current examples (e.g. https://carpentries.github.io/sandpaper-docs/episodes.html#what-is-the-.rmd-extension).
The Rmd to create the attached image and HTML is.
Output from HTML inspector
CSS styling for the uppercase underlined text appears to be applied to the
<div class="section level3 callout-title callout-inner">
which containsh3
and the classcallout-content
.Package List