From e9aae0b74c45308dfe5dc05f08bc9fb7a90fd92a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 26 Apr 2025 17:47:38 +0200 Subject: [PATCH] doc: recognize also the new half-float literals for color swatches. --- doc/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index ed831f5c7..c9bf319d3 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -41,10 +41,10 @@ VERSION_LABELS = True # There used to be a Pygments patch that would recognize the suffix as part of # the literal, https://github.com/pygments/pygments/pull/1303, but it fell # though the cracks and I was unable to resubmit it again. So this patch adds -# both the color swatch and removes the in between. # TODO either resubmit the patch or do this patching also for all others (_deg, # _rad, _sec, _nsec, ...) -_magnum_colors_src = re.compile(r"""0x(?P[0-9a-f]{6})(?P[0-9a-f]{2})?()?(?P_s?rgba?f?)""") +_magnum_colors_src = re.compile(r"""0x(?P[0-9a-f]{6})(?P[0-9a-f]{2})?()?(?P_s?rgba?(f|h)?)""") _magnum_colors_dst = r"""0x\g\g\g""" # Code wrapped in DOXYGEN_ELLIPSIS() will get replaced by an (Unicode) ellipsis