pax_global_header 0000666 0000000 0000000 00000000064 14750157774 0014533 g ustar 00root root 0000000 0000000 52 comment=b087f762b32b9e995083ecfa97008e904f8e6445 mdformat-0.7.22/ 0000775 0000000 0000000 00000000000 14750157774 0013434 5 ustar 00root root 0000000 0000000 mdformat-0.7.22/.bumpversion.cfg 0000664 0000000 0000000 00000001571 14750157774 0016550 0 ustar 00root root 0000000 0000000 [bumpversion] commit = True tag = True tag_name = {new_version} current_version = 0.7.22 [bumpversion:file:pyproject.toml] search = version = "{current_version}" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT replace = version = "{new_version}" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT [bumpversion:file:src/mdformat/__init__.py] search = __version__ = "{current_version}" replace = __version__ = "{new_version}" [bumpversion:file:docs/users/installation_and_usage.md] search = rev: {current_version} # Use the ref you want to point at replace = rev: {new_version} # Use the ref you want to point at [bumpversion:file:docs/conf.py] search = release = '{current_version}' # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT replace = release = '{new_version}' # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT mdformat-0.7.22/.flake8 0000664 0000000 0000000 00000000365 14750157774 0014613 0 ustar 00root root 0000000 0000000 [flake8] max-line-length = 88 max-complexity = 10 extend-ignore = # E203: Whitespace before ':' (violates PEP8 and black style) E203, # A005: A module is shadowing a Python builtin module A005, extend-exclude = */site-packages/* mdformat-0.7.22/.gitattributes 0000664 0000000 0000000 00000000136 14750157774 0016327 0 ustar 00root root 0000000 0000000 # Don't do text manipulations (line ending changes). Tests require # unchanged files. * -text mdformat-0.7.22/.github/ 0000775 0000000 0000000 00000000000 14750157774 0014774 5 ustar 00root root 0000000 0000000 mdformat-0.7.22/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 14750157774 0017157 5 ustar 00root root 0000000 0000000 mdformat-0.7.22/.github/ISSUE_TEMPLATE/bug.yaml 0000664 0000000 0000000 00000003503 14750157774 0020621 0 ustar 00root root 0000000 0000000 name: Report a bug 🐛 description: Mdformat crashes or exit code is non-zero, output is invalid CommonMark, rendered document is visually different after formatting... labels: [bug] body: - type: textarea id: describe attributes: label: Describe the bug description: | Provide a short description (one or two sentences) about the problem. What did you expect to happen, and what is actually happening? value: | **context** When I do ___. **expectation** I expected ___ to occur. **bug** But instead ___ happens Here's an error message I ran into... ```console $ mdformat README.md ERROR ... ``` validations: required: true - type: textarea id: reproduce attributes: label: Reproduce the bug description: | Provide information that others may use to re-produce this behavior. For example: - A self-contained command to reproduce the error, e.g. ```console printf -- '- item A\n - item A.a\n- item B' | pipx run mdformat - ``` - Minimal content of a file that when formatted causes the error. Command to format the file. placeholder: | 1. Create a file test.md with the content '...' 2. Run `mdformat test.md` 3. See error validations: required: true - type: textarea id: environment attributes: label: List your environment description: | List the environment needed to reproduce the error. Here are a few ideas: - The output of: ```console mdformat --version ``` - The version of Python you're using. - Your operating system placeholder: | ``` ❯ mdformat --version mdformat 0.7.18 (mdformat_black: 0.1.1) ``` validations: required: true mdformat-0.7.22/.github/ISSUE_TEMPLATE/config.yml 0000664 0000000 0000000 00000000562 14750157774 0021152 0 ustar 00root root 0000000 0000000 contact_links: - name: Why does Mdformat use backslash to escape my Markdown engine specific syntax? ⁉️ url: https://github.com/hukkin/mdformat?tab=readme-ov-file#why-does-mdformat-backslash-escape-special-syntax-specific-to-mkdocs--hugo--obsidian--github--some-other-markdown-engine about: It's likely you need to install a plugin. See the FAQ more info. mdformat-0.7.22/.github/ISSUE_TEMPLATE/enhancement.yaml 0000664 0000000 0000000 00000001224 14750157774 0022327 0 ustar 00root root 0000000 0000000 name: Request an enhancement 💡 description: Suggest an idea for this project labels: [enhancement] body: - type: textarea id: context attributes: label: Context description: | - Provide background to help others understand this issue. - Describe the problem or need you'd like to address. validations: required: true - type: textarea id: proposal attributes: label: Proposal description: | - A simple and clear description of what you're proposing. - Ideas or constraints for how to implement this proposal - Important considerations to think about or discuss validations: required: false mdformat-0.7.22/.github/workflows/ 0000775 0000000 0000000 00000000000 14750157774 0017031 5 ustar 00root root 0000000 0000000 mdformat-0.7.22/.github/workflows/tests.yaml 0000664 0000000 0000000 00000005475 14750157774 0021072 0 ustar 00root root 0000000 0000000 name: Tests on: push: branches: [ master ] tags: [ '[0-9]+.[0-9]+.[0-9]+*' ] pull_request: branches: [ master ] jobs: linters: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: '3.11' - name: Installation (deps and package) run: | pip install . pre-commit mypy==1.13.0 -r tests/requirements.txt - name: run linters run: | mdformat --check docs/ README.md mypy src/ tests/ pre-commit run -a pre-commit try-repo . mdformat --files README.md tests: runs-on: ${{ matrix.os }} strategy: matrix: python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14-dev'] os: [ubuntu-latest, macos-latest, windows-latest] continue-on-error: ${{ matrix.python-version == '3.14-dev' }} steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Installation (deps and package) run: | pip install . -r tests/requirements.txt - name: Test with pytest run: | pytest --cov - name: Report coverage if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} # Run mdformat-gfm's tests to catch issues like https://github.com/hukkin/mdformat/issues/501. test-gfm-plugin: runs-on: ubuntu-latest continue-on-error: true steps: - uses: actions/setup-python@v5 with: python-version: '3.x' - uses: actions/checkout@v4 with: path: mdformat/ - uses: actions/checkout@v4 with: repository: hukkin/mdformat-gfm path: mdformat-gfm/ - run: | pip install pytest pip install --editable mdformat-gfm/ pip install --force-reinstall --editable mdformat/ - run: | pytest mdformat-gfm/ allgood: runs-on: ubuntu-latest needs: - linters - tests steps: - run: echo "Great success!" pypi-publish: # Only publish if all other jobs succeed needs: [ allgood ] if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install build and publish tools run: | pip install build twine - name: Build and check run: | rm -rf dist/ && python -m build twine check --strict dist/* - name: Publish run: | twine upload dist/* env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} mdformat-0.7.22/.gitignore 0000664 0000000 0000000 00000003456 14750157774 0015434 0 ustar 00root root 0000000 0000000 # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ pip-wheel-metadata/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover *.py,cover .hypothesis/ .pytest_cache/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 db.sqlite3-journal # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # pyenv .python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. #Pipfile.lock # PEP 582; used by e.g. github.com/David-OConnor/pyflow __pypackages__/ # Celery stuff celerybeat-schedule celerybeat.pid # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ .dmypy.json dmypy.json # Pyre type checker .pyre/ # IntelliJ .idea/ # VS Code .vscode/ mdformat-0.7.22/.pre-commit-config.yaml 0000664 0000000 0000000 00000003050 14750157774 0017713 0 ustar 00root root 0000000 0000000 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0 hooks: - id: check-yaml - id: check-toml - repo: https://github.com/pre-commit/pygrep-hooks rev: 3a6eb0fadf60b3cccfd80bad9dbb6fae7e47b316 # frozen: v1.10.0 hooks: - id: python-use-type-annotations - id: python-check-blanket-noqa - id: python-check-blanket-type-ignore - repo: https://github.com/asottile/yesqa rev: f2ae90cf9e1661ade79d0881186ce4fd7ba6ee79 # frozen: v1.5.0 hooks: - id: yesqa additional_dependencies: - flake8-bugbear - flake8-builtins - flake8-comprehensions - repo: https://github.com/MarcoGorelli/absolufy-imports rev: 1683a63d850e065495c05b771e4a20db010a58e7 # frozen: v0.3.1 hooks: - id: absolufy-imports - repo: https://github.com/PyCQA/isort rev: 0a0b7a830386ba6a31c2ec8316849ae4d1b8240d # frozen: 6.0.0 hooks: - id: isort - repo: https://github.com/psf/black rev: 8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b # frozen: 25.1.0 hooks: - id: black - repo: https://github.com/hukkin/docformatter rev: ab802050e6e96aaaf7f917fcbc333bb74e2e57f7 # frozen: v1.4.2 hooks: - id: docformatter - repo: https://github.com/PyCQA/flake8 rev: e43806be3607110919eff72939fda031776e885a # frozen: 7.1.1 hooks: - id: flake8 additional_dependencies: - flake8-bugbear - flake8-builtins - flake8-comprehensions - repo: https://github.com/pre-commit/pre-commit rev: b152e922ef11a97efe22ca7dc4f90011f0d1711c # frozen: v4.1.0 hooks: - id: validate_manifest mdformat-0.7.22/.pre-commit-hooks.yaml 0000664 0000000 0000000 00000000270 14750157774 0017572 0 ustar 00root root 0000000 0000000 - id: mdformat name: mdformat description: "CommonMark compliant Markdown formatter" entry: mdformat language: python types: [markdown] minimum_pre_commit_version: '1.0.0' mdformat-0.7.22/.readthedocs.yaml 0000664 0000000 0000000 00000000304 14750157774 0016660 0 ustar 00root root 0000000 0000000 version: 2 build: os: 'ubuntu-lts-latest' tools: python: '3.13' sphinx: configuration: docs/conf.py fail_on_warning: true python: install: - requirements: docs/requirements.txt mdformat-0.7.22/LICENSE 0000664 0000000 0000000 00000002060 14750157774 0014437 0 ustar 00root root 0000000 0000000 MIT License Copyright (c) 2021 Taneli Hukkinen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. mdformat-0.7.22/MANIFEST.in 0000664 0000000 0000000 00000000015 14750157774 0015166 0 ustar 00root root 0000000 0000000 prune tests/ mdformat-0.7.22/README.md 0000664 0000000 0000000 00000020506 14750157774 0014716 0 ustar 00root root 0000000 0000000