├── .github ├── dependabot.yml └── workflows │ └── CI.yml ├── .gitignore ├── .pre-commit-config.yaml ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── NOTICE ├── README.md ├── docs └── _static │ └── markdown-it.rs.svg ├── pyproject.toml ├── python └── markdown_it_pyrs │ ├── __init__.py │ ├── cli.py │ ├── markdown_it_pyrs.pyi │ └── py.typed ├── src ├── lib.rs └── nodes.rs ├── tests ├── bench_html.py ├── bench_tree.py ├── fixtures │ ├── ast.md │ ├── autolink_ext.md │ ├── commonmark_extras.md │ ├── commonmark_spec.json │ ├── deflist.md │ ├── footnote.md │ ├── front_matter.md │ ├── linkify.md │ ├── normalize.md │ ├── smartquotes.md │ ├── sourcepos.md │ ├── spec.md │ ├── strikethrough.md │ ├── tables.md │ ├── tasklists.md │ └── typographer.md ├── test_api.py ├── test_cli.py └── test_fixtures.py └── tox.ini /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: github-actions 9 | directory: / 10 | commit-message: 11 | prefix: ⬆️ 12 | schedule: 13 | interval: weekly 14 | - package-ecosystem: pip 15 | directory: / 16 | commit-message: 17 | prefix: ⬆️ 18 | schedule: 19 | interval: weekly 20 | - package-ecosystem: cargo 21 | directory: / 22 | commit-message: 23 | prefix: ⬆️ 24 | schedule: 25 | interval: weekly 26 | -------------------------------------------------------------------------------- /.github/workflows/CI.yml: -------------------------------------------------------------------------------- 1 | # This file is autogenerated by maturin v1.0.1 2 | # To update, run 3 | # 4 | # maturin generate-ci github --pytest 5 | # 6 | name: CI 7 | 8 | on: 9 | push: 10 | branches: 11 | - main 12 | tags: 13 | - 'v*' 14 | pull_request: 15 | workflow_dispatch: 16 | 17 | permissions: 18 | contents: read 19 | 20 | jobs: 21 | 22 | pre-commit: 23 | runs-on: ubuntu-latest 24 | steps: 25 | - uses: actions/checkout@v4 26 | - uses: actions/setup-python@v5 27 | with: 28 | python-version: "3.9" 29 | - uses: pre-commit/action@v3.0.0 30 | 31 | cargo-clippy: 32 | runs-on: ubuntu-latest 33 | steps: 34 | - uses: actions/checkout@v4 35 | - name: install rust stable 36 | uses: dtolnay/rust-toolchain@stable 37 | - name: cache rust 38 | uses: Swatinem/rust-cache@v2 39 | - name: Run clippy 40 | run: cargo clippy 41 | 42 | test-python: 43 | 44 | runs-on: ubuntu-latest 45 | strategy: 46 | fail-fast: false 47 | matrix: 48 | python-version: 49 | - '3.9' 50 | - '3.10' 51 | - '3.11' 52 | - '3.12' 53 | - 'pypy3.9' 54 | steps: 55 | - uses: actions/checkout@v4 56 | - name: install rust stable 57 | uses: dtolnay/rust-toolchain@stable 58 | - name: cache rust 59 | uses: Swatinem/rust-cache@v2 60 | with: 61 | key: test-v1 62 | - name: set up python 63 | uses: actions/setup-python@v5 64 | with: 65 | python-version: ${{ matrix.python-version }} 66 | - run: pip install -e .[testing] 67 | env: 68 | RUST_BACKTRACE: 1 69 | - run: pip freeze 70 | - run: pytest 71 | 72 | linux: 73 | runs-on: ubuntu-latest 74 | strategy: 75 | fail-fast: false 76 | matrix: 77 | target: 78 | - x86_64 79 | - x86 80 | - aarch64 81 | - armv7 82 | # - s390x # TODO build fails: "error: failed to run custom build command for `psm v0.1.21`"" 83 | - ppc64le 84 | steps: 85 | - uses: actions/checkout@v4 86 | - uses: actions/setup-python@v5 87 | with: 88 | python-version: "3.10" 89 | - name: Build wheels 90 | uses: PyO3/maturin-action@v1 91 | with: 92 | target: ${{ matrix.target }} 93 | args: --release --out dist --find-interpreter 94 | sccache: 'true' 95 | manylinux: auto 96 | - name: Upload wheels 97 | uses: actions/upload-artifact@v3 98 | with: 99 | name: wheels 100 | path: dist 101 | - name: pytest 102 | if: ${{ startsWith(matrix.target, 'x86_64') }} 103 | shell: bash 104 | run: | 105 | set -e 106 | pip install --upgrade pip 107 | pip install markdown_it_pyrs --find-links dist --force-reinstall 108 | pip install pytest pytest-param-files 109 | pytest 110 | - name: pytest 111 | if: ${{ !startsWith(matrix.target, 'x86') && matrix.target != 'ppc64' }} 112 | uses: uraimo/run-on-arch-action@v2 113 | with: 114 | arch: ${{ matrix.target }} 115 | distro: ubuntu22.04 116 | githubToken: ${{ github.token }} 117 | install: | 118 | apt-get update 119 | apt-get install -y --no-install-recommends python3-dev python3-pip build-essential 120 | pip3 install -U pip pytest pytest-param-files 121 | run: | 122 | set -e 123 | pip3 install markdown_it_pyrs --find-links dist --force-reinstall 124 | pytest 125 | 126 | windows: 127 | runs-on: windows-latest 128 | strategy: 129 | fail-fast: false 130 | matrix: 131 | target: [x64, x86] 132 | steps: 133 | - uses: actions/checkout@v4 134 | - uses: actions/setup-python@v5 135 | with: 136 | python-version: '3.10' 137 | architecture: ${{ matrix.target }} 138 | - name: Build wheels 139 | uses: PyO3/maturin-action@v1 140 | with: 141 | target: ${{ matrix.target }} 142 | args: --release --out dist --find-interpreter 143 | sccache: 'true' 144 | - name: Upload wheels 145 | uses: actions/upload-artifact@v3 146 | with: 147 | name: wheels 148 | path: dist 149 | - name: pytest 150 | if: ${{ !startsWith(matrix.target, 'aarch64') }} 151 | shell: bash 152 | run: | 153 | set -e 154 | pip install --upgrade pip 155 | pip install markdown_it_pyrs --find-links dist --force-reinstall 156 | pip install pytest pytest-param-files 157 | pytest 158 | 159 | macos: 160 | runs-on: macos-latest 161 | strategy: 162 | fail-fast: false 163 | matrix: 164 | target: [x86_64, aarch64] 165 | steps: 166 | - uses: actions/checkout@v4 167 | - uses: actions/setup-python@v5 168 | with: 169 | python-version: '3.10' 170 | - name: Build wheels 171 | uses: PyO3/maturin-action@v1 172 | with: 173 | target: ${{ matrix.target }} 174 | args: --release --out dist --find-interpreter 175 | sccache: 'true' 176 | - name: Upload wheels 177 | uses: actions/upload-artifact@v3 178 | with: 179 | name: wheels 180 | path: dist 181 | - name: pytest 182 | if: ${{ !startsWith(matrix.target, 'aarch64') }} 183 | shell: bash 184 | run: | 185 | set -e 186 | pip install --upgrade pip 187 | pip install markdown_it_pyrs --find-links dist --force-reinstall 188 | pip install pytest pytest-param-files 189 | pytest 190 | 191 | sdist: 192 | runs-on: ubuntu-latest 193 | steps: 194 | - uses: actions/checkout@v4 195 | - name: Build sdist 196 | uses: PyO3/maturin-action@v1 197 | with: 198 | command: sdist 199 | args: --out dist 200 | - name: Upload sdist 201 | uses: actions/upload-artifact@v3 202 | with: 203 | name: wheels 204 | path: dist 205 | 206 | # https://github.com/marketplace/actions/alls-green#why used for branch protection checks 207 | check: 208 | if: always() 209 | needs: [pre-commit, cargo-clippy, test-python, linux, windows, macos, sdist] 210 | runs-on: ubuntu-latest 211 | steps: 212 | - name: Decide whether the needed jobs succeeded or failed 213 | uses: re-actors/alls-green@release/v1 214 | with: 215 | jobs: ${{ toJSON(needs) }} 216 | allowed-failures: coverage 217 | 218 | release: 219 | runs-on: ubuntu-latest 220 | if: "startsWith(github.ref, 'refs/tags/')" 221 | needs: [pre-commit, cargo-clippy, test-python, linux, windows, macos, sdist] 222 | steps: 223 | - uses: actions/download-artifact@v3 224 | with: 225 | name: wheels 226 | - name: Publish to PyPI 227 | uses: PyO3/maturin-action@v1 228 | env: 229 | MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} 230 | with: 231 | command: upload 232 | args: --skip-existing * 233 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | 3 | # Byte-compiled / optimized / DLL files 4 | __pycache__/ 5 | .pytest_cache/ 6 | *.py[cod] 7 | 8 | # C extensions 9 | *.so 10 | 11 | # Distribution / packaging 12 | .Python 13 | .venv/ 14 | env/ 15 | bin/ 16 | build/ 17 | develop-eggs/ 18 | dist/ 19 | eggs/ 20 | lib/ 21 | lib64/ 22 | parts/ 23 | sdist/ 24 | var/ 25 | include/ 26 | man/ 27 | venv/ 28 | *.egg-info/ 29 | .installed.cfg 30 | *.egg 31 | 32 | # Installer logs 33 | pip-log.txt 34 | pip-delete-this-directory.txt 35 | pip-selfcheck.json 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .cache 42 | nosetests.xml 43 | coverage.xml 44 | 45 | # Translations 46 | *.mo 47 | 48 | # Mr Developer 49 | .mr.developer.cfg 50 | .project 51 | .pydevproject 52 | 53 | # Rope 54 | .ropeproject 55 | 56 | # Django stuff: 57 | *.log 58 | *.pot 59 | 60 | .DS_Store 61 | 62 | # Sphinx documentation 63 | docs/_build/ 64 | 65 | # PyCharm 66 | .idea/ 67 | 68 | # VSCode 69 | .vscode/ 70 | 71 | # Pyenv 72 | .python-version 73 | 74 | archive/ 75 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # See https://pre-commit.com for more information 2 | # See https://pre-commit.com/hooks.html for more hooks 3 | repos: 4 | - repo: https://github.com/pre-commit/pre-commit-hooks 5 | rev: v5.0.0 6 | hooks: 7 | - id: trailing-whitespace 8 | exclude: ^tests/fixtures/.* 9 | - id: end-of-file-fixer 10 | - id: check-yaml 11 | - id: check-added-large-files 12 | 13 | - repo: local 14 | hooks: 15 | - id: cargo-fmt 16 | name: cargo-fmt 17 | description: Format files with cargo fmt. 18 | entry: cargo fmt 19 | language: rust 20 | types: [rust] 21 | args: ["--"] 22 | 23 | - repo: https://github.com/pycqa/isort 24 | rev: 5.13.2 25 | hooks: 26 | - id: isort 27 | 28 | - repo: https://github.com/psf/black 29 | rev: 24.10.0 30 | hooks: 31 | - id: black 32 | 33 | - repo: https://github.com/astral-sh/ruff-pre-commit 34 | rev: v0.7.0 35 | hooks: 36 | - id: ruff 37 | 38 | - repo: https://github.com/pre-commit/mirrors-mypy 39 | rev: v1.12.1 40 | hooks: 41 | - id: mypy 42 | files: > 43 | (?x)^( 44 | .*\.pyi| 45 | tests/test_api\.py 46 | )$ 47 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "1.0.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "argparse" 16 | version = "0.2.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "3f8ebf5827e4ac4fd5946560e6a99776ea73b596d80898f357007317a7141e47" 19 | 20 | [[package]] 21 | name = "autocfg" 22 | version = "1.1.0" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 25 | 26 | [[package]] 27 | name = "bitflags" 28 | version = "1.3.2" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 31 | 32 | [[package]] 33 | name = "cc" 34 | version = "1.0.81" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "6c6b2562119bf28c3439f7f02db99faf0aa1a8cdfe5772a2ee155d32227239f0" 37 | dependencies = [ 38 | "libc", 39 | ] 40 | 41 | [[package]] 42 | name = "cfg-if" 43 | version = "1.0.0" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 46 | 47 | [[package]] 48 | name = "const_format" 49 | version = "0.2.31" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | checksum = "c990efc7a285731f9a4378d81aff2f0e85a2c8781a05ef0f8baa8dac54d0ff48" 52 | dependencies = [ 53 | "const_format_proc_macros", 54 | ] 55 | 56 | [[package]] 57 | name = "const_format_proc_macros" 58 | version = "0.2.31" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "e026b6ce194a874cb9cf32cd5772d1ef9767cc8fcb5765948d74f37a9d8b2bf6" 61 | dependencies = [ 62 | "proc-macro2", 63 | "quote", 64 | "unicode-xid", 65 | ] 66 | 67 | [[package]] 68 | name = "convert_case" 69 | version = "0.4.0" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 72 | 73 | [[package]] 74 | name = "derivative" 75 | version = "2.2.0" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 78 | dependencies = [ 79 | "proc-macro2", 80 | "quote", 81 | "syn 1.0.109", 82 | ] 83 | 84 | [[package]] 85 | name = "derive_more" 86 | version = "0.99.17" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 89 | dependencies = [ 90 | "convert_case", 91 | "proc-macro2", 92 | "quote", 93 | "rustc_version", 94 | "syn 1.0.109", 95 | ] 96 | 97 | [[package]] 98 | name = "downcast-rs" 99 | version = "1.2.0" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" 102 | 103 | [[package]] 104 | name = "either" 105 | version = "1.9.0" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" 108 | 109 | [[package]] 110 | name = "entities" 111 | version = "1.0.1" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" 114 | 115 | [[package]] 116 | name = "gfm-autolinks" 117 | version = "0.2.0" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | checksum = "e759407cedde28f2324a4ce9e1b309a5730b328985c2f5482d87fd3a75535d55" 120 | dependencies = [ 121 | "once_cell", 122 | "unicode_categories", 123 | ] 124 | 125 | [[package]] 126 | name = "github-slugger" 127 | version = "0.1.0" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "721820f4eab1c427d482e144b63288754d9872fb7f0d72d73ab101008ef43147" 130 | dependencies = [ 131 | "once_cell", 132 | "regex", 133 | ] 134 | 135 | [[package]] 136 | name = "html-escape" 137 | version = "0.2.13" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" 140 | dependencies = [ 141 | "utf8-width", 142 | ] 143 | 144 | [[package]] 145 | name = "idna" 146 | version = "0.3.0" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 149 | dependencies = [ 150 | "unicode-bidi", 151 | "unicode-normalization", 152 | ] 153 | 154 | [[package]] 155 | name = "indoc" 156 | version = "1.0.9" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" 159 | 160 | [[package]] 161 | name = "itertools" 162 | version = "0.11.0" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" 165 | dependencies = [ 166 | "either", 167 | ] 168 | 169 | [[package]] 170 | name = "libc" 171 | version = "0.2.147" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" 174 | 175 | [[package]] 176 | name = "linkify" 177 | version = "0.10.0" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "f1dfa36d52c581e9ec783a7ce2a5e0143da6237be5811a0b3153fedfdbe9f780" 180 | dependencies = [ 181 | "memchr", 182 | ] 183 | 184 | [[package]] 185 | name = "lock_api" 186 | version = "0.4.10" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" 189 | dependencies = [ 190 | "autocfg", 191 | "scopeguard", 192 | ] 193 | 194 | [[package]] 195 | name = "markdown-it" 196 | version = "0.6.0" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | checksum = "181d1b4704b0a2fc6027d3f758a7eedb975dcbaab86e6794901b8cfc52af94d5" 199 | dependencies = [ 200 | "argparse", 201 | "const_format", 202 | "derivative", 203 | "derive_more", 204 | "downcast-rs", 205 | "entities", 206 | "html-escape", 207 | "linkify", 208 | "mdurl", 209 | "once_cell", 210 | "readonly", 211 | "regex", 212 | "stacker", 213 | "unicode-general-category", 214 | ] 215 | 216 | [[package]] 217 | name = "markdown-it-autolink" 218 | version = "0.2.0" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "174c842c23decdaad9eb0a950758bdbeee0772e517c23f498bee9dba75244a0c" 221 | dependencies = [ 222 | "gfm-autolinks", 223 | "markdown-it", 224 | ] 225 | 226 | [[package]] 227 | name = "markdown-it-deflist" 228 | version = "0.3.0" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "0f76fc1fc9594f2f7bedce2d44c76df1ee3289d6e856300d2d48a7b02971e59e" 231 | dependencies = [ 232 | "markdown-it", 233 | ] 234 | 235 | [[package]] 236 | name = "markdown-it-footnote" 237 | version = "0.2.0" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "e6679ab967fbc45b290b25fb477af7556bf6825feec208a970585e6bb9aae3be" 240 | dependencies = [ 241 | "markdown-it", 242 | ] 243 | 244 | [[package]] 245 | name = "markdown-it-front-matter" 246 | version = "0.3.0" 247 | source = "registry+https://github.com/rust-lang/crates.io-index" 248 | checksum = "5181d76def41e21e40175078f3e4879d11f7ca93a2e781d69131f6648e4f5205" 249 | dependencies = [ 250 | "markdown-it", 251 | ] 252 | 253 | [[package]] 254 | name = "markdown-it-gfm" 255 | version = "0.1.0" 256 | source = "registry+https://github.com/rust-lang/crates.io-index" 257 | checksum = "04c64ba9a73203407a75a6c04ae6972c5c1e9f60518f82a010f186013ef27d5e" 258 | dependencies = [ 259 | "markdown-it", 260 | "markdown-it-autolink", 261 | "markdown-it-heading-anchors", 262 | "markdown-it-tasklist", 263 | "regex", 264 | ] 265 | 266 | [[package]] 267 | name = "markdown-it-heading-anchors" 268 | version = "0.3.0" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "3c8c71a46fc41bf2fdac133c188c1477562b7bcd1be3981e84fc81cfc2e515fe" 271 | dependencies = [ 272 | "github-slugger", 273 | "markdown-it", 274 | ] 275 | 276 | [[package]] 277 | name = "markdown-it-tasklist" 278 | version = "0.2.0" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "c401c2e7cd96552a6da0eefc8024f9d9ec5afde9b2d6d3fee70f14a7ebafd496" 281 | dependencies = [ 282 | "markdown-it", 283 | "once_cell", 284 | "regex", 285 | "stacker", 286 | ] 287 | 288 | [[package]] 289 | name = "markdown_it_pyrs" 290 | version = "0.3.0" 291 | dependencies = [ 292 | "itertools", 293 | "markdown-it", 294 | "markdown-it-autolink", 295 | "markdown-it-deflist", 296 | "markdown-it-footnote", 297 | "markdown-it-front-matter", 298 | "markdown-it-gfm", 299 | "markdown-it-heading-anchors", 300 | "markdown-it-tasklist", 301 | "pyo3", 302 | "stacker", 303 | ] 304 | 305 | [[package]] 306 | name = "mdurl" 307 | version = "0.3.1" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "5736ba45bbac8f7ccc99a897f88ce85e508a18baec973a040f2514e6cdbff0d2" 310 | dependencies = [ 311 | "idna", 312 | "once_cell", 313 | "regex", 314 | ] 315 | 316 | [[package]] 317 | name = "memchr" 318 | version = "2.5.0" 319 | source = "registry+https://github.com/rust-lang/crates.io-index" 320 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 321 | 322 | [[package]] 323 | name = "memoffset" 324 | version = "0.9.0" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" 327 | dependencies = [ 328 | "autocfg", 329 | ] 330 | 331 | [[package]] 332 | name = "once_cell" 333 | version = "1.18.0" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 336 | 337 | [[package]] 338 | name = "parking_lot" 339 | version = "0.12.1" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 342 | dependencies = [ 343 | "lock_api", 344 | "parking_lot_core", 345 | ] 346 | 347 | [[package]] 348 | name = "parking_lot_core" 349 | version = "0.9.8" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" 352 | dependencies = [ 353 | "cfg-if", 354 | "libc", 355 | "redox_syscall", 356 | "smallvec", 357 | "windows-targets", 358 | ] 359 | 360 | [[package]] 361 | name = "proc-macro2" 362 | version = "1.0.66" 363 | source = "registry+https://github.com/rust-lang/crates.io-index" 364 | checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" 365 | dependencies = [ 366 | "unicode-ident", 367 | ] 368 | 369 | [[package]] 370 | name = "psm" 371 | version = "0.1.21" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" 374 | dependencies = [ 375 | "cc", 376 | ] 377 | 378 | [[package]] 379 | name = "pyo3" 380 | version = "0.19.2" 381 | source = "registry+https://github.com/rust-lang/crates.io-index" 382 | checksum = "e681a6cfdc4adcc93b4d3cf993749a4552018ee0a9b65fc0ccfad74352c72a38" 383 | dependencies = [ 384 | "cfg-if", 385 | "indoc", 386 | "libc", 387 | "memoffset", 388 | "parking_lot", 389 | "pyo3-build-config", 390 | "pyo3-ffi", 391 | "pyo3-macros", 392 | "unindent", 393 | ] 394 | 395 | [[package]] 396 | name = "pyo3-build-config" 397 | version = "0.19.2" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "076c73d0bc438f7a4ef6fdd0c3bb4732149136abd952b110ac93e4edb13a6ba5" 400 | dependencies = [ 401 | "once_cell", 402 | "target-lexicon", 403 | ] 404 | 405 | [[package]] 406 | name = "pyo3-ffi" 407 | version = "0.19.2" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "e53cee42e77ebe256066ba8aa77eff722b3bb91f3419177cf4cd0f304d3284d9" 410 | dependencies = [ 411 | "libc", 412 | "pyo3-build-config", 413 | ] 414 | 415 | [[package]] 416 | name = "pyo3-macros" 417 | version = "0.19.2" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "dfeb4c99597e136528c6dd7d5e3de5434d1ceaf487436a3f03b2d56b6fc9efd1" 420 | dependencies = [ 421 | "proc-macro2", 422 | "pyo3-macros-backend", 423 | "quote", 424 | "syn 1.0.109", 425 | ] 426 | 427 | [[package]] 428 | name = "pyo3-macros-backend" 429 | version = "0.19.2" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "947dc12175c254889edc0c02e399476c2f652b4b9ebd123aa655c224de259536" 432 | dependencies = [ 433 | "proc-macro2", 434 | "quote", 435 | "syn 1.0.109", 436 | ] 437 | 438 | [[package]] 439 | name = "quote" 440 | version = "1.0.32" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" 443 | dependencies = [ 444 | "proc-macro2", 445 | ] 446 | 447 | [[package]] 448 | name = "readonly" 449 | version = "0.2.11" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "b8f439da1766942fe069954da6058b2e6c1760eb878bae76f5be9fc29f56f574" 452 | dependencies = [ 453 | "proc-macro2", 454 | "quote", 455 | "syn 2.0.28", 456 | ] 457 | 458 | [[package]] 459 | name = "redox_syscall" 460 | version = "0.3.5" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 463 | dependencies = [ 464 | "bitflags", 465 | ] 466 | 467 | [[package]] 468 | name = "regex" 469 | version = "1.9.1" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" 472 | dependencies = [ 473 | "aho-corasick", 474 | "memchr", 475 | "regex-automata", 476 | "regex-syntax", 477 | ] 478 | 479 | [[package]] 480 | name = "regex-automata" 481 | version = "0.3.4" 482 | source = "registry+https://github.com/rust-lang/crates.io-index" 483 | checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" 484 | dependencies = [ 485 | "aho-corasick", 486 | "memchr", 487 | "regex-syntax", 488 | ] 489 | 490 | [[package]] 491 | name = "regex-syntax" 492 | version = "0.7.4" 493 | source = "registry+https://github.com/rust-lang/crates.io-index" 494 | checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" 495 | 496 | [[package]] 497 | name = "rustc_version" 498 | version = "0.4.0" 499 | source = "registry+https://github.com/rust-lang/crates.io-index" 500 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 501 | dependencies = [ 502 | "semver", 503 | ] 504 | 505 | [[package]] 506 | name = "scopeguard" 507 | version = "1.2.0" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 510 | 511 | [[package]] 512 | name = "semver" 513 | version = "1.0.18" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" 516 | 517 | [[package]] 518 | name = "smallvec" 519 | version = "1.11.0" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" 522 | 523 | [[package]] 524 | name = "stacker" 525 | version = "0.1.15" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" 528 | dependencies = [ 529 | "cc", 530 | "cfg-if", 531 | "libc", 532 | "psm", 533 | "winapi", 534 | ] 535 | 536 | [[package]] 537 | name = "syn" 538 | version = "1.0.109" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 541 | dependencies = [ 542 | "proc-macro2", 543 | "quote", 544 | "unicode-ident", 545 | ] 546 | 547 | [[package]] 548 | name = "syn" 549 | version = "2.0.28" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" 552 | dependencies = [ 553 | "proc-macro2", 554 | "quote", 555 | "unicode-ident", 556 | ] 557 | 558 | [[package]] 559 | name = "target-lexicon" 560 | version = "0.12.11" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" 563 | 564 | [[package]] 565 | name = "tinyvec" 566 | version = "1.6.0" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 569 | dependencies = [ 570 | "tinyvec_macros", 571 | ] 572 | 573 | [[package]] 574 | name = "tinyvec_macros" 575 | version = "0.1.1" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 578 | 579 | [[package]] 580 | name = "unicode-bidi" 581 | version = "0.3.13" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 584 | 585 | [[package]] 586 | name = "unicode-general-category" 587 | version = "0.6.0" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7" 590 | 591 | [[package]] 592 | name = "unicode-ident" 593 | version = "1.0.11" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" 596 | 597 | [[package]] 598 | name = "unicode-normalization" 599 | version = "0.1.22" 600 | source = "registry+https://github.com/rust-lang/crates.io-index" 601 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 602 | dependencies = [ 603 | "tinyvec", 604 | ] 605 | 606 | [[package]] 607 | name = "unicode-xid" 608 | version = "0.2.4" 609 | source = "registry+https://github.com/rust-lang/crates.io-index" 610 | checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" 611 | 612 | [[package]] 613 | name = "unicode_categories" 614 | version = "0.1.1" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" 617 | 618 | [[package]] 619 | name = "unindent" 620 | version = "0.1.11" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" 623 | 624 | [[package]] 625 | name = "utf8-width" 626 | version = "0.1.6" 627 | source = "registry+https://github.com/rust-lang/crates.io-index" 628 | checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1" 629 | 630 | [[package]] 631 | name = "winapi" 632 | version = "0.3.9" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 635 | dependencies = [ 636 | "winapi-i686-pc-windows-gnu", 637 | "winapi-x86_64-pc-windows-gnu", 638 | ] 639 | 640 | [[package]] 641 | name = "winapi-i686-pc-windows-gnu" 642 | version = "0.4.0" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 645 | 646 | [[package]] 647 | name = "winapi-x86_64-pc-windows-gnu" 648 | version = "0.4.0" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 651 | 652 | [[package]] 653 | name = "windows-targets" 654 | version = "0.48.1" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" 657 | dependencies = [ 658 | "windows_aarch64_gnullvm", 659 | "windows_aarch64_msvc", 660 | "windows_i686_gnu", 661 | "windows_i686_msvc", 662 | "windows_x86_64_gnu", 663 | "windows_x86_64_gnullvm", 664 | "windows_x86_64_msvc", 665 | ] 666 | 667 | [[package]] 668 | name = "windows_aarch64_gnullvm" 669 | version = "0.48.0" 670 | source = "registry+https://github.com/rust-lang/crates.io-index" 671 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 672 | 673 | [[package]] 674 | name = "windows_aarch64_msvc" 675 | version = "0.48.0" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 678 | 679 | [[package]] 680 | name = "windows_i686_gnu" 681 | version = "0.48.0" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 684 | 685 | [[package]] 686 | name = "windows_i686_msvc" 687 | version = "0.48.0" 688 | source = "registry+https://github.com/rust-lang/crates.io-index" 689 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 690 | 691 | [[package]] 692 | name = "windows_x86_64_gnu" 693 | version = "0.48.0" 694 | source = "registry+https://github.com/rust-lang/crates.io-index" 695 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 696 | 697 | [[package]] 698 | name = "windows_x86_64_gnullvm" 699 | version = "0.48.0" 700 | source = "registry+https://github.com/rust-lang/crates.io-index" 701 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 702 | 703 | [[package]] 704 | name = "windows_x86_64_msvc" 705 | version = "0.48.0" 706 | source = "registry+https://github.com/rust-lang/crates.io-index" 707 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 708 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "markdown_it_pyrs" 3 | version = "0.4.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [lib] 9 | name = "markdown_it_pyrs" 10 | crate-type = ["cdylib"] 11 | 12 | [dependencies] 13 | itertools = "0.11.0" 14 | markdown-it = { version = "0.6", default-features = false, features = ["linkify"]} 15 | markdown-it-autolink = "0.2.0" 16 | markdown-it-deflist = "0.3.0" 17 | markdown-it-footnote = "0.2.0" 18 | markdown-it-front-matter = "0.3.0" 19 | markdown-it-heading-anchors = "0.3.0" 20 | markdown-it-tasklist = "0.2.0" 21 | markdown-it-gfm = "0.1.0" 22 | pyo3 = "0.19.2" 23 | stacker = "0.1.15" 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright Christopher Sewell 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # markdown-it-pyrs 2 | 3 | [![PyPI][pypi-badge]][pypi-link] 4 | 5 | [pypi-badge]: https://img.shields.io/pypi/v/markdown-it-pyrs.svg 6 | [pypi-link]: https://pypi.org/project/markdown-it-pyrs 7 | 8 |
9 |
10 |