Skip to content

Commit

Permalink
chore: Fix escape function to properly handle pipe character in markd…
Browse files Browse the repository at this point in the history
…own, return to old lint
  • Loading branch information
JakubAndrysek committed Jun 21, 2024
1 parent 239cdac commit fefb698
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 31 deletions.
24 changes: 3 additions & 21 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,7 @@ on: [push, pull_request]
jobs:
pre-commit:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install pre-commit sourcery-cli pre-commit-hooks black ruff pytest
pip install -e ".[dev]"
sudo apt-get install doxygen
- name: Run pre-commit hooks
uses: pre-commit/[email protected]
with:
extra_args: '--all-files'
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,3 @@ repos:
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: local
hooks:
- id: pytest
name: pytest
entry: ./.venv/bin/pytest
language: system
types: [python]
2 changes: 1 addition & 1 deletion mkdoxy/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def escape(s: str) -> str:
ret = ret.replace("_", "\\_")
ret = ret.replace("<", "&lt;")
ret = ret.replace(">", "&gt;")
return ret.replace("|", "\|")
return ret.replace("|", "\\|")


class MdRenderer:
Expand Down

0 comments on commit fefb698

Please sign in to comment.