diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41c0fc9..05a974d 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.0 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] 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 '$'