From 9fad9ee1fbdc1c2b9ad1d18c4d392ec85508f64f Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Tue, 18 Nov 2025 11:38:15 +0000 Subject: [PATCH 1/2] make indentation into nbsp --- test/test_markup.py | 4 ++++ webtools/code_markup.py | 1 + 2 files changed, 5 insertions(+) diff --git a/test/test_markup.py b/test/test_markup.py index 03e9d02..5ee3eb0 100644 --- a/test/test_markup.py +++ b/test/test_markup.py @@ -7,3 +7,7 @@ def test_code_highlight_cpp(): assert "#<" in code_highlight("#", "cpp") assert "#<" in markup("```cpp\n#\n```\n") + + assert "
    " in markup( + "```python\nfor i in range(10):\n print(i)\n```\n", + ) diff --git a/webtools/code_markup.py b/webtools/code_markup.py index ebcdfca..d5e8e08 100644 --- a/webtools/code_markup.py +++ b/webtools/code_markup.py @@ -16,6 +16,7 @@ def _highlight(txt: str, comment_start: str, keywords: typing.List[str]) -> str: """General highlight function.""" out = [] + txt = txt.replace(" ", " ") for line in txt.split("\n"): comment = "" if comment_start in line: From acadcec1a1f5f0a2afc4c48c19fad8cb4f1c1e46 Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Tue, 18 Nov 2025 11:39:00 +0000 Subject: [PATCH 2/2] version++ --- pyproject.toml | 2 +- webtools/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c914b91..e21d363 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "website-build-tools" -version = "0.1.8" +version = "0.1.9" 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 ca0cfd4..77d22ac 100644 --- a/webtools/__init__.py +++ b/webtools/__init__.py @@ -1,3 +1,3 @@ """Website building tools.""" -__version__ = "0.1.8" +__version__ = "0.1.9"