From 07b8e5d00d5aed4a498b053d5dd62ad79f7d33a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 20 Feb 2023 16:40:36 +0100 Subject: [PATCH] m.code,doxygen: test inline ANSI code highlighting. Because it got broken with Pygments newer than the ancient 2.6.1 fork I have (it now unconditionally adds a wrapper
), and unfortunately I can't see how to not do that in 2.14 without delegating into private APIs. So just to have that problematic part reproduced in tests, once I get to that. Unfortunately latest Pelican doesn't work with older Pygments anymore for some reason (or, well, disallows it), so I can't generate the website until I have this fixed properly. Ugh. --- documentation/test_doxygen/contents_code_language/ansi.html | 2 +- documentation/test_doxygen/contents_code_language/input.dox | 2 ++ plugins/m/test/code/page.html | 2 +- plugins/m/test/code/page.rst | 4 +++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/documentation/test_doxygen/contents_code_language/ansi.html b/documentation/test_doxygen/contents_code_language/ansi.html index a071d1e3..b2db02dc 100644 --- a/documentation/test_doxygen/contents_code_language/ansi.html +++ b/documentation/test_doxygen/contents_code_language/ansi.html @@ -22,7 +22,7 @@

ANSI color escape code highlighting

-
![mosra@don-perverzo m.css]$ 
██ ██ ██ ██ ██ ▓▓ ▒▒
+

Including inline highlighting:

![mosra@don-perverzo m.css]$ 
██ ██ ██ ██ ██ ▓▓ ▒▒
 
 Leading zeros: ▒▒ ▒▒
 
diff --git a/documentation/test_doxygen/contents_code_language/input.dox b/documentation/test_doxygen/contents_code_language/input.dox
index a35fefc5..1ee303f4 100644
--- a/documentation/test_doxygen/contents_code_language/input.dox
+++ b/documentation/test_doxygen/contents_code_language/input.dox
@@ -32,6 +32,8 @@ Another paragraph.
 
 /** @page ansi ANSI color escape code highlighting
 
+Including @code{.ansi} inline @endcode highlighting:
+
 @code{.ansi}
 ![mosra@don-perverzo m.css]$ 
 @endcode
diff --git a/plugins/m/test/code/page.html b/plugins/m/test/code/page.html
index 1d85e6ad..2a63fc1e 100644
--- a/plugins/m/test/code/page.html
+++ b/plugins/m/test/code/page.html
@@ -50,7 +50,7 @@ ASan reports:
 

Syntax highlighting:

# Comment
 var = "string{}escape\n"
-

Console colors:

+

Console colors, including inline code:

Named foreground colors:
   Black Red Green Yellow Blue Magenta Cyan White Default
   BrightBlack BrightRed BrightGreen BrightYellow
diff --git a/plugins/m/test/code/page.rst b/plugins/m/test/code/page.rst
index 3cef393f..09a13fda 100644
--- a/plugins/m/test/code/page.rst
+++ b/plugins/m/test/code/page.rst
@@ -1,6 +1,8 @@
 m.code
 ######
 
+.. role:: ansi(code)
+    :language: ansi
 .. role:: cpp(code)
     :language: c++
 .. role:: tex(code)
@@ -55,7 +57,7 @@ Syntax highlighting:
     # Comment
     var = "string{}escape\n"
 
-Console colors:
+Console colors, including :ansi:`inline` code:
 
 .. include:: console-colors.ansi
     :code: ansi
-- 
2.30.2