eecs485staff / primer-spec

A Jekyll theme for sites with content-heavy pages
https://eecs485staff.github.io/primer-spec/
MIT License
22 stars 12 forks source link

Data-highlight inside callout #215

Closed awdeorio closed 1 year ago

awdeorio commented 2 years ago

Describe the bug The data-highlight feature appears to be broken when used inside a callout.

To Reproduce I couldn't get the right rendering here, so I attached an example: example.md

Screenshots

Screen Shot 2022-10-04 at 12 28 21 PM
seshrs commented 1 year ago

I think you placed the "data-highlight" attribute in the wrong line! It needs to be placed underneath the end of the codeblock, but inside the <div>. This worked for me:

<div class="primer-spec-callout warning icon-warning" markdown="1">
Double-check that you didn't accidentally commit automatically generated or binary files to version control.  For example, the highlighted files are binaries.
```console
$ git ls-files
.gitignore
Makefile
main.cpp
main.exe
main.exe.dSYM/Contents/Info.plist
main.exe.dSYM/Contents/Resources/DWARF/main.exe
main_test.in
main_test.out.correct
main_test_data.tsv
p1_library.cpp
p1_library.h
stats.cpp
stats.h
stats_public_test.cpp
stats_tests.cpp

{: data-highlight="5-7" }

awdeorio commented 1 year ago

Welp, that's embarrassing!