From 8e60e2dc51bf82ff35f5f1f1290706d2375d6c14 Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Thu, 11 Dec 2025 07:57:17 +0000 Subject: [PATCH 1/2] add class to highlight keywords in Python --- pyproject.toml | 2 +- webtools/__init__.py | 2 +- webtools/code_markup.py | 17 +++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e21d363..0be8a05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "website-build-tools" -version = "0.1.9" +version = "0.1.10" description = "tools for building websites, used by defelement.org and quadraturerules.org" readme = "README.md" requires-python = ">=3.8.0" diff --git a/webtools/__init__.py b/webtools/__init__.py index 77d22ac..e122254 100644 --- a/webtools/__init__.py +++ b/webtools/__init__.py @@ -1,3 +1,3 @@ """Website building tools.""" -__version__ = "0.1.9" +__version__ = "0.1.10" diff --git a/webtools/code_markup.py b/webtools/code_markup.py index d5e8e08..27f006a 100644 --- a/webtools/code_markup.py +++ b/webtools/code_markup.py @@ -57,18 +57,19 @@ def python_highlight(txt: str) -> str: txt, "#", [ + "assert", + "class" + "def", + "elif", + "else", "for", - "while", "from", - "import", - "return", + "global", "if", - "elif", - "else", - "def", + "import", "in", - "global", - "assert", + "return", + "while", ], ) From 4bd833673ce68dd38097120fb259ba19d17d6e7a Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Thu, 11 Dec 2025 07:58:49 +0000 Subject: [PATCH 2/2] , --- webtools/code_markup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webtools/code_markup.py b/webtools/code_markup.py index 27f006a..5ecfeca 100644 --- a/webtools/code_markup.py +++ b/webtools/code_markup.py @@ -58,7 +58,7 @@ def python_highlight(txt: str) -> str: "#", [ "assert", - "class" + "class", "def", "elif", "else",