From 672463a812f3efca62134333f8e44894ab81afdf Mon Sep 17 00:00:00 2001 From: Greg Lueck Date: Fri, 20 Feb 2026 14:29:09 -0500 Subject: [PATCH] Remove some VUID scripting The "genanchorlinks" script is failing when I update the docker image to the latest version. I think the new docker image probably has a newer Python, and this script probably has a bug that is diagnosed by the new Python. It's not worth fixing, though, because we don't even need this script. It seems to be something we inherited from Vulkan when we first set up our build process. Remove the script and the associated "VUID" styling from the CSS file. I verified that the only difference in the generated HTML is that the CSS related to "VUID" is no longer there. There are no anchors with "VUID" ids, so this styling has no effect. All this "VUID" stuff seems to be a Vulkan-specific convention, which we don't use in the SYCL spec. --- adoc/Makefile | 4 ---- adoc/config/khronos.css | 7 ------- adoc/scripts/genanchorlinks.py | 25 ------------------------- 3 files changed, 36 deletions(-) delete mode 100644 adoc/scripts/genanchorlinks.py 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])