diff --git a/adoc/Makefile b/adoc/Makefile index 8216e51b0..424732638 100644 --- a/adoc/Makefile +++ b/adoc/Makefile @@ -182,9 +182,6 @@ $(OUTDIR)/$(KATEXDIR)/README.md: katex/README.md $(QUIET)$(RMRF) $(OUTDIR)/$(KATEXDIR) $(QUIET)$(CP) --archive katex $(OUTDIR) -# Script to add href to anchors -GENANCHORLINKS = $(SCRIPTS)/genanchorlinks.py - # Spec targets # There is some complexity to try and avoid short virtual targets like 'html' # causing specs to *always* be regenerated. @@ -215,7 +212,6 @@ html: $(HTMLDIR)/$(SPEC_BASE_NAME).html $(SPECSRC) $(COMMONDOCS) %.html: $(SPECSRC) $(COMMONDOCS) katexinst $(QUIET)$(ASCIIDOC) --backend html5 $(ADOCOPTS) $(ADOCHTMLOPTS) \ --out-file $@ $(SPECSRC) - $(QUIET)$(PYTHON) $(GENANCHORLINKS) $@ $@ $(QUIET)$(NODEJS) translate_math.js $@ diff_html: $(HTMLDIR)/diff.html $(SPECSRC) $(COMMONDOCS) diff --git a/adoc/config/khronos.css b/adoc/config/khronos.css index e66358077..210005b33 100644 --- a/adoc/config/khronos.css +++ b/adoc/config/khronos.css @@ -804,10 +804,3 @@ p.tableblock.header { color: #6d6e71; } /* From https://github.com/KhronosGroup/Vulkan-Docs/pull/901 */ a code { color: inherit; } - -/* Make VUID anchor handles*/ -li > p > a[id^="VUID-"] { visibility: hidden; position: absolute; z-index: 1001; width: 2.2ex; margin-left: -2.2ex; display: block; text-decoration: none !important; text-align: center; font-weight: normal; } -li > p > a[id^="VUID-"]:before { content: "\00A7"; font-size: 1em; display: block; padding-top: 0em; background: #fff } -li > p:hover > a[id^="VUID-"], li > p > a[id^="VUID-"]:hover { visibility: visible; } -li > p > a[id^="VUID-"].link { color: black; text-decoration: none; } /* TODO: not quite sure what these two do */ -li > p > a[id^="VUID-"].link:hover { color: black; } diff --git a/adoc/scripts/genanchorlinks.py b/adoc/scripts/genanchorlinks.py deleted file mode 100644 index 499a1abb8..000000000 --- a/adoc/scripts/genanchorlinks.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/python3 -# -# Copyright (c) 2020-2025 The Khronos Group, Inc. -# SPDX-License-Identifier: Apache-2.0 - -# Script that adds href to anchors - -import os,sys,re - -def genAnchorLinks(in_file, out_file): - try: - with open(in_file, 'r', encoding='utf8') as f: data = f.read() - except FileNotFoundError: - print('Error: File %s does not exist.' % in_file) - sys.exit(2) - - data = re.sub( r'()', '\g<1>\g<2> href="#\g<3>"\g<4>', data) - with open(out_file, 'w', encoding='utf8') as f: data = f.write(data) - -if __name__ == '__main__': - if len(sys.argv) != 3: - print('Error: genanchorlinks.py requires two arguments.') - print('Usage: genanchorlinks.py infile.html outfile.html') - sys.exit(1) - genAnchorLinks(sys.argv[1], sys.argv[2])