Knowledge-Graphs-Book / HTML-Book

Other
36 stars 7 forks source link

BibTeX code no longer syntax-highlighted #59

Closed Antoine-Zimmermann closed 3 months ago

Antoine-Zimmermann commented 4 months ago

The BibTeX code is no longer syntax-highlighted. The reason is that the JS responsible for it came from a file somewhere else on the Web and is no longer available. We must replace line 26 of book.php:

<script src="https://saswatpadhi.github.io/prismjs-bibtex/prism-bibtex.min.js"></script>

with:

<script src="https://cdn.jsdelivr.net/npm/prismjs-bibtex@2.1.0/prism-bibtex.js"
        integrity="sha256-A5GMUmGHpY8mVpfcaRLQFeHtmdjZLumKBOMpf81FXX0="
        crossorigin="anonymous" referrerpolicy="no-referrer">
</script>

I opened pull request #58 for this.

miselico commented 4 months ago

Save a few bytes and use @.***/prism-bibtex.min.js instead?

On Thu, Feb 22, 2024, 08:43 Antoine Zimmermann @.***> wrote:

The BibTeX code is no longer syntax-highlighted. The reason is that the JS responsible for it came from a file somewhere else on the Web and is no longer available. We must replace line 26 of book.php:

with:

<script @.***/prism-bibtex.js" integrity="sha256-A5GMUmGHpY8mVpfcaRLQFeHtmdjZLumKBOMpf81FXX0=" crossorigin="anonymous" referrerpolicy="no-referrer">

I opened pull request #58 https://github.com/Knowledge-Graphs-Book/HTML-Book/pull/58 for this.

— Reply to this email directly, view it on GitHub https://github.com/Knowledge-Graphs-Book/HTML-Book/issues/59, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5VU24WMMKH2QAGITWYW3DYU3ZLXAVCNFSM6AAAAABDUNVKAKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2DQNBSG4YTENQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Antoine-Zimmermann commented 3 months ago

I added "min" to save bytes. I think I'll merge and if anyone complains, they'll shout here and reopen the PR.

Antoine-Zimmermann commented 3 months ago

I updated the files and merged, with a slight hickup as I needed to change the integrity checksum too. See #60 .