qmd-lab / closeread

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

remove trigger markup for non-scrolly formats #147

Open andrewpbray opened 1 day ago

andrewpbray commented 1 day ago

It'd be nice if a closeread doc could "fail gracefully" when rendered to a different format like pdf or html. Right now it does so fairly well with the exception of the @cr-mysticky which remain visible in the narrative blocks after rendering. A few options:

  1. Appeal to Quarto devs to add cr- as a protected prefix. Then we could have Quarto scrub them.
  2. Switch closeread to a filter that could be run even on different formats. When run on those formats, all it'd run is a trigger scrubber.
  3. Add options to closeread-html to also produce an alternate (non-scrolly) format.
jimjam-slam commented 1 day ago

Mmmm, good idea! I still love the idea of getting Closeread all the way down to a filter, but I can't remember now what our blocker on that was.

andrewpbray commented 15 hours ago

Haha, I was trying to remember why we decided to hold off on the filter for now and ... I really couldn't remember our rationale for sticking with a format for the time being!