pax_global_header00006660000000000000000000000064150414503170014512gustar00rootroot0000000000000052 comment=0f5f07e06a9390456be3bcc15fbff4db4672566c python-markdown2-2.5.4/000077500000000000000000000000001504145031700147455ustar00rootroot00000000000000python-markdown2-2.5.4/.github/000077500000000000000000000000001504145031700163055ustar00rootroot00000000000000python-markdown2-2.5.4/.github/ISSUE_TEMPLATE/000077500000000000000000000000001504145031700204705ustar00rootroot00000000000000python-markdown2-2.5.4/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000016071504145031700231660ustar00rootroot00000000000000--- name: Bug report about: Report a parsing error, unexpected output and other bugs title: '' labels: bug assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Attach a minimal markdown snippet that causes the bug to occur. This should be placed inside a fenced code block to escape GitHub's formatting. If your snippet contains fenced code blocks then you can escape them by adding more backticks to the enclosing block. See the [this GitHub article](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#fenced-code-blocks) for an example. **Expected behavior** A clear and concise description of what you expected to happen. **Debug info** Version of library being used: Any extras being used: **Additional context** Add any other context about the problem here. python-markdown2-2.5.4/.github/workflows/000077500000000000000000000000001504145031700203425ustar00rootroot00000000000000python-markdown2-2.5.4/.github/workflows/python.yaml000066400000000000000000000014101504145031700225430ustar00rootroot00000000000000name: PythonCI on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ${{ matrix.os }} strategy: matrix: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] os: - ubuntu-latest - macos-latest - windows-latest steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install .[all] - name: Test run: | make testone - name: Test ReDoS run: | make testredos python-markdown2-2.5.4/.gitignore000066400000000000000000000002431504145031700167340ustar00rootroot00000000000000*.pyc tmp deps/pygments deps/pygments3 dist MANIFEST build googlecode_upload.py perf/*.prof perf/tmp-*-cases sandbox/*.html __pycache__ .tox *.egg-info *.idea venvpython-markdown2-2.5.4/CHANGES.md000066400000000000000000000661331504145031700163500ustar00rootroot00000000000000# python-markdown2 Changelog ## python-markdown2 2.5.4 - [pull #617] Add MarkdownFileLinks extra (#528) - [pull #622] Add missing block tags to regex (#620) - [pull #623] Don't escape plus signs in URLs (#621) - [pull #626] Fix XSS when encoding incomplete tags (#625) - [pull #628] Fix TypeError in MiddleWordEm extra when options was None (#627) - [pull #630] Fix nbsp breaking tables (#629) - [pull #634] Fix ReDoS in HTML tokenizer regex (#633) ## python-markdown2 2.5.3 - [pull #616] make tables without body gfm compatible ## python-markdown2 2.5.2 - [pull #605] Add support for Python 3.13, drop EOL 3.8 - [pull #607] Fix `middle-word-em` extra preventing strongs from being recognized (#606) - [pull #609] Add option to output to file in CLI (#608) - [pull #612] Fix footnote labels appearing out-of-order (#536) - [pull #613] Fix smarty pants extra not triggering when it should (#611) ## python-markdown2 2.5.1 - [pull #590] Fix underscores within bold text getting emphasized (#589) - [pull #591] Add Alerts extra - [pull #595] Fix img alt text being processed as markdown (#594) - [pull #598] Add `link-shortrefs` extra (#597) - [pull #600] Use urandom for SECRET_SALT - [pull #602] Fix XSS issue in safe mode (#601) - [pull #604] Fix XSS injection in image URLs (#603) ## python-markdown2 2.5.0 - [pull #519] Add support for custom extras - [pull #519] Drop Python 3.5 support - [pull #568] Add `prepend` arg to toc extra (#397) - [pull #569] Process HTML comments as markdown in 'escape' safe mode - [pull #570] Fix syntax warnings in test suite - [pull #572] Process inline tags as HTML blocks when they span multiple lines (#571) - [pull #573] Add new LaTeX Extra - [pull #576] Fix `html`, `head` and `body` tags being wrapped in `

` tags (#575) - [pull #578] Graceful handling of broken lists when cuddled-lists extra is enabled - [pull #581] Add type hints (#562) - [pull #581] Drop Python 3.6 and 3.7 support - [pull #582] Fix fenced code blocks breaking lists (#580) - [pull #586] Fix #583 by tweaking incomplete tag regex - [pull #587] Fix AssertionError on malformed HTML (#584) ## python-markdown2 2.4.13 - [pull #559] Allow cuddled tables (#557) - [pull #560] Fix `markdown-in-html` not always splitting HTML tags into separate lines (#558) - [pull #564] Fix incomplete comments in safe mode not being escaped (#563) - [pull #566] Fix crash in `markdown-in-html` extra (#565) ## python-markdown2 2.4.12 - [pull #547] Update `markdown-in-html` extra to handle markdown on same line as HTML (#546) - [pull #550] Fix tables with trailing whitespace not being recognized (#549) - [pull #545] Fix multiple instances of strong emphasis (`**`) in one line (#541) - [pull #556] Fix incorrect parsing of links after square brackets (#552) ## python-markdown2 2.4.11 - [pull #524] Fix angles being escaped in style blocks (issue #523) - [pull #527] Fix base64 images being corrupted in safe mode (issue #526) - [pull #529] Add `breaks` extra with ability to hard break on backslashes (issue #525) - [pull #532] Fix #493 persisting when `code-friendly` extra enabled - [pull #535] Update `_slugify` to use utf-8 encoding (issue #534) - [pull #536] Maintain order of appearance in footnotes - [pull #538] Include HTML headers in TOC - [pull #540] Add mechanism to prevent header ID counter resetting (issue #530) ## python-markdown2 2.4.10 - [pull #520] Allow more relative links in safe mode (issue #517) - [pull #521] Always restore hashed HTML blocks (issue #185) - [pull #522] Add `middle-word-em` extra ## python-markdown2 2.4.9 - [pull #500] Add `` tag to html-classes extra - [pull #501] Fix link patterns extra matching against internal hashes - [pull #502] Replace deprecated `optparse` with `argparse` - [pull #506] Fix `_uniform_outdent` failing with empty strings (issue #505) - [pull #509] Fix HTML elements not unhashing correctly (issue 508) - [pull #511] Remove deprecated `imp` module (issue #510) - [pull #512] Allow link patterns to be passed via extras dict - [pull #513] Fix relative links not working in safe mode (issue #254) ## python-markdown2 2.4.8 - [pull #499] Fix images not being procesed correctly (#498) ## python-markdown2 2.4.7 - [pull #483] Fix hashing nested HTML blocks - [pull #486] Fix backslash being unable to escape raw HTML tags - [pull #482] Add support for telegram spoiler in extras - [pull #485] mermaid support - [pull #487] Fix escaping ampersands in hrefs - [pull #490] Fix indented codeblocks inside fences (#489) - [pull #490] Remove `code-color` extra ## python-markdown2 2.4.6 - [pull #477] Feature wavedrom support - [pull #480] Fix mixing ordered and un-ordered lists combining into single list type ## python-markdown2 2.4.5 - [pull #466] Add optional dependencies to `setup.py` ## python-markdown2 2.4.4 - [pull #439] Fix TypeError if html-classes extra is None - [pull #441] Remove Python2 support - [pull #445] Replace `` with `` in strike extra - [pull #446] Fix link patterns extra applying within links - [pull #443] create proper entry point - [pull #449] Codespans inside link text issue344 - [pull #451] Underline and HTML comments - [pull #453] Links with brackets - [pull #454] Fix emacs local variable one-liners - [pull #457] Example of the current mixed-paragraph mode behavior in lists - [pull #455] Fix code block indentation in lists - [pull #434] Fix filter bypass leading to XSS (#362) - [pull #464] Fix html-classes extra not applying to code spans - [pull #462] Fix pygments block matching - [pull #462] Fix pyshell blocks in blockquotes - [pull #463] Fix multilevel lists - [pull #468] Remove `_uniform_outdent_limit` function - [pull #470] Add support for ordered lists that don't start at 1. (#469) - [pull #472] Fix `AssertionError` with lazy numbered lists (issue #471) - [pull #475] Add `