From 29633932ad7f7c1d725cfe2a9fbb3ee5f212ba99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 30 Sep 2024 14:16:47 +0200 Subject: [PATCH] doc: make the color literal swatch patching work with vanilla Pygments. --- doc/changelog.dox | 4 ++++ doc/conf.py | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index baea0602d..230c102e2 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -1410,6 +1410,10 @@ See also: data to slices of @ref Text::AbstractGlyphCache::image() instead and call @relativeref{Text::AbstractGlyphCache,flushImage()} instead. The old API can only be called on 2D glyph caches now. + - @cpp Text::DistanceFieldGlyphCache::distanceFieldTextureSize() @ce and + @cpp setDistanceFieldImage() @ce is deprecated in favor of + @ref Text::AbstractGlyphCache::processedSize() and + @relativeref{Text,AbstractGlyphCache,setProcessedImage()} - The @cpp TextureTools::atlas() @ce utility is deprecated in favor of @ref TextureTools::AtlasLandfill, which has a vastly better packing efficiency, supports incremental packing and doesn't force the caller to diff --git a/doc/conf.py b/doc/conf.py index 6720d73ee..67f128258 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -38,7 +38,13 @@ FAVICON = 'favicon.ico' VERSION_LABELS = True -_magnum_colors_src = re.compile(r"""0x(?P[0-9a-f]{6})(?P[0-9a-f]{2})?(?P_s?rgba?f?)""") +# 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 0x(?P[0-9a-f]{6})(?P[0-9a-f]{2})?()?(?P_s?rgba?f?)""") _magnum_colors_dst = r"""0x\g\g\g""" # Code wrapped in DOXYGEN_ELLIPSIS() will get replaced by an (Unicode) ellipsis