qmd-lab / closeread

https://closeread.dev
MIT License
128 stars 5 forks source link

Examples from the guide not working? #85

Closed gkaramanis closed 3 months ago

gkaramanis commented 3 months ago

I can't seem to make the examples from the guide to work, like highlighting. I hope it's just my jet-lagged brain missing something simple! 😅

Screenshot 2024-08-19 at 14 40 30 Screenshot 2024-08-19 at 14 40 44
kpivert commented 3 months ago

Hey @gkaramanis , I experienced the same thing when I walked through the docs, but when you wrap it within the ::::{.cr-section} <code> :::: it works. Great to meet you! Kurtis

andrewpbray commented 3 months ago

Yep, I think there are two things here:

As @kpivert mentions, all the closeread features must be wrapped in a div with .cr-section.

The other thing, though, is that that the documented use cases for highlighting code is for the source code, not the output. So you'll want to add #| echo: true to your code cell. Note that allowing for focus effects on code output is our top priority (track the issue in #78 ). We'll be doing some develop and hopefully fixing this in about a week an half!

gkaramanis commented 3 months ago

Thank you both, it makes perfect sense!