-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
callout text all uppercase #59
Comments
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 |
And I apologise for not replying sooner. The last quarter has been nothing but chaos 😞 |
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.
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 When I modify that snapshot manually and run the test suite, the test fails because the The 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: 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 #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
The text was updated successfully, but these errors were encountered: