eecs280staff / tutorials

Tools and tutorials
https://eecs280staff.github.io/tutorials/
Other
5 stars 4 forks source link

[Primer Spec] Use magic comments for highlighting lines in code blocks #56

Closed seshrs closed 1 year ago

seshrs commented 1 year ago

v1.9.0 of Primer Spec now allows you to highlight lines in a code block using "magic comments". I love the syntax since (a) it's clear which lines will be highlighted, and (b) you don't have to update the highlighted line numbers if you change the code block!

Unfortunately, they only work when the code block uses syntax highlighting and allows for "comment" lines. Hence, this syntax doesn't work for console or json blocks.

This PR removes usage of data-highlight in favor of magic comments for all eligible code blocks in this repo. (I also cleaned up some invalid usages of highlighted lines.)

github-actions[bot] commented 1 year ago

The spec from this PR is available at https://preview.sesh.rs/previews/eecs280staff/tutorials/56/.

(Available until Sun Jan 29 2023.)