From 277192f4eef65850829ba96620f1057771dc7feb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:33:35 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.4.4 → v0.12.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.4...v0.12.3) - [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.16.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.0...v1.16.1) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41c0fc9..b7da4b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ exclude: > repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-json - id: check-yaml @@ -20,14 +20,14 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.4 + rev: v0.12.3 hooks: - id: ruff args: [--fix] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.0 + rev: v1.16.1 hooks: - id: mypy additional_dependencies: [markdown-it-py~=3.0] From 7f950fbc496e32a1200d2cb40af3d1004eec0100 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:34:14 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mdit_py_plugins/texmath/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdit_py_plugins/texmath/index.py b/mdit_py_plugins/texmath/index.py index 63a169d..c00e70e 100644 --- a/mdit_py_plugins/texmath/index.py +++ b/mdit_py_plugins/texmath/index.py @@ -152,7 +152,7 @@ def _func(state: StateBlock, begLine: int, endLine: int, silent: bool) -> bool: def dollar_pre(src: str, beg: int) -> bool: prv = charCodeAt(src[beg - 1], 0) if beg > 0 else False return ( - (not prv) or prv != 0x5C and (prv < 0x30 or prv > 0x39) # no backslash, + (not prv) or (prv != 0x5C and (prv < 0x30 or prv > 0x39)) # no backslash, ) # no decimal digit .. before opening '$'