Commit 4911782
committed
book2: remove unused Pygments syntax highlighting CSS
These rules were introduced in 05cde25 ("prepare for progit v2",
2014-10-23) when Scott Chacon copied the theme CSS verbatim from the
progit/progit2 repository's `theme/html/html.css`. That CSS targeted
Pygments syntax highlighting output (manni theme) with selectors like
`pre code.go` and `pre[data-code-language="console"]`, matching the
HTMLBook format that O'Reilly's Atlas platform produced.
The Atlas pipeline was replaced by direct Asciidoctor rendering in
bbe6cf1 ("Task for publishing progit2 books from git", 2016-12-30),
and the Atlas-based `genbook2` task was dropped entirely in a0a189b
("book2.rake: drop "genbook2" task", 2018-09-20), which noted that
"Atlas hasn't existed for a few years."
Asciidoctor without a `source-highlighter` attribute — and one was
never configured in this repository's history — does not produce
Pygments token classes. Instead, it emits `<code class="language-X"
data-lang="X">` with plain text content (no per-token `<code>`
children, and `data-lang` rather than `data-code-language`).
This can be verified by downloading the build artifact from the
latest "Deploy to GitHub Pages" workflow run via the GitHub API,
unpacking it, and searching for any matching HTML elements:
# download the `pages` artifact (adjust the artifact ID)
gh api repos/git/git-scm.com/actions/artifacts/<id>/zip > pages.zip
unzip -q pages.zip -d pages-outer
mkdir site && tar xzf pages-outer/pages.tar.gz -C site
grep -rP 'data-code-language|<code class="[a-z]{1,3}"' site/ --include='*.html'
This returns no matches at all, confirming that these Pygments
selectors have been dead CSS since the Atlas-to-Asciidoctor
transition in late 2016.
Assisted-by: Claude Opus 4.6
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent dd89378 commit 4911782
1 file changed
Lines changed: 0 additions & 95 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | 611 | | |
0 commit comments