From 58a733676c6c7eab53576f1653d9ae187dec6238 Mon Sep 17 00:00:00 2001 From: Stuart Axon Date: Thu, 11 Jun 2026 16:51:27 +0000 Subject: [PATCH] pelican-import: Support the SyntaxHighlighter plugin. This was the default for about 10 years. --- pelican/tools/pelican_import.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 1c03f9c9..9935b9f6 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -107,6 +107,13 @@ def decode_wp_content(content, br=True): content = _multi_replace(pre_tags, content) + # SyntaxHighlighter plugin format (on WP this is quote forgiving) + content = re.sub( + r']*\bbrush\s*:\s*([\w#+-]+)[^>]*>', + r'
',
+            content,
+        )
+
     # convert [caption] tags into 
content = re.sub( r"\[caption(?:.*?)(?:caption=\"(.*?)\")?\]"