comrak 0.0.11__cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
comrak/__init__.py
ADDED
|
Binary file
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: comrak
|
|
3
|
+
Version: 0.0.11
|
|
4
|
+
Classifier: Intended Audience :: Developers
|
|
5
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
6
|
+
Classifier: Programming Language :: Rust
|
|
7
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
8
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Summary: Python bindings for the Comrak Rust library, a fast CommonMark/GFM parser
|
|
19
|
+
Keywords: markdown,html,rust,commonmark,gfm,parser
|
|
20
|
+
Author-email: Louis Maddox <louismmx@gmail.com>
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
23
|
+
Project-URL: Homepage, https://github.com/lmmx/comrak
|
|
24
|
+
Project-URL: Repository, https://github.com/lmmx/comrak.git
|
|
25
|
+
|
|
26
|
+
# comrak
|
|
27
|
+
|
|
28
|
+
<!-- [](https://pepy.tech/project/comrak) -->
|
|
29
|
+
[](https://github.com/astral-sh/uv)
|
|
30
|
+
[](https://pdm.fming.dev)
|
|
31
|
+
[](https://pypi.org/project/comrak)
|
|
32
|
+
[](https://pypi.org/project/comrak)
|
|
33
|
+
[](https://pypi.python.org/pypi/comrak)
|
|
34
|
+
[](https://results.pre-commit.ci/latest/github/lmmx/comrak/master)
|
|
35
|
+
|
|
36
|
+
Python bindings for the [Comrak Rust library](https://crates.io/crates/comrak), a fast CommonMark/GFM parser
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install comrak
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Requirements
|
|
45
|
+
|
|
46
|
+
- Python 3.9+
|
|
47
|
+
|
|
48
|
+
## Features
|
|
49
|
+
|
|
50
|
+
Fast Markdown to HTML parser in Rust, shipped for Python via PyO3.
|
|
51
|
+
|
|
52
|
+
### Options
|
|
53
|
+
|
|
54
|
+
All options are exposed in a simple manner:
|
|
55
|
+
|
|
56
|
+
```py
|
|
57
|
+
>>> import comrak
|
|
58
|
+
>>> opts = comrak.ExtensionOptions()
|
|
59
|
+
>>> comrak.render_markdown("foo :smile:", extension_options=opts)
|
|
60
|
+
'<p>foo :smile:</p>\n'
|
|
61
|
+
>>> opts.shortcodes = True
|
|
62
|
+
>>> comrak.render_markdown("foo :smile:", extension_options=opts)
|
|
63
|
+
'<p>foo 😄</p>\n'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Refer to the [Comrak docs](https://docs.rs/comrak/latest/comrak/struct.Options.html) for all available options.
|
|
67
|
+
|
|
68
|
+
## Benchmarks
|
|
69
|
+
|
|
70
|
+
Tested with small (8 lines) and medium (1200 lines) markdown strings
|
|
71
|
+
|
|
72
|
+
- vs. [markdown](https://pypi.org/project/markdown): 15x faster (S/M)
|
|
73
|
+
- vs. [markdown2](https://pypi.org/project/markdown2): 20x (S) - 60x (M) faster
|
|
74
|
+
|
|
75
|
+
## Contributing
|
|
76
|
+
|
|
77
|
+
Maintained by [lmmx](https://github.com/lmmx). Contributions welcome!
|
|
78
|
+
|
|
79
|
+
1. **Issues & Discussions**: Please open a GitHub issue or discussion for bugs, feature requests, or questions.
|
|
80
|
+
2. **Pull Requests**: PRs are welcome!
|
|
81
|
+
- Install the dev extra (e.g. with [uv](https://docs.astral.sh/uv/): `uv pip install -e .[dev]`)
|
|
82
|
+
- Run tests (when available) and include updates to docs or examples if relevant.
|
|
83
|
+
- If reporting a bug, please include the version and the error message/traceback if available.
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
Licensed under the 2-Clause BSD License. See [LICENSE](https://github.com/lmmx/comrak/blob/master/LICENSE) for all the details.
|
|
88
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
comrak-0.0.11.dist-info/METADATA,sha256=gD2Lny2fICKa1i2zyaoKO9d_WtVzINnRuyF7SAWnKhk,3557
|
|
2
|
+
comrak-0.0.11.dist-info/WHEEL,sha256=JNT-Rh-LS-QjEr3qHUmdqWoAGiDykeyhqqTv7BerwPw,149
|
|
3
|
+
comrak-0.0.11.dist-info/licenses/LICENSE,sha256=Oph2Y_Nxhg7i9L9t1bW3LdtMQJNkIl5tDKLqmNnFnCs,8986
|
|
4
|
+
comrak/__init__.py,sha256=H-lprYD1Pf1TgIMrspnMxaKc6nzSR58I8zQEItFxzJg,107
|
|
5
|
+
comrak/comrak.cpython-313t-arm-linux-gnueabihf.so,sha256=BnY1ncQyo2gOXd7qE729YHVdUjqDZ02sPqxlgIcTFUw,1375556
|
|
6
|
+
comrak-0.0.11.dist-info/RECORD,,
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Copyright (c) 2017–2024, Asherah Connor and Comrak contributors
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
* Redistributions of source code must retain the above copyright
|
|
9
|
+
notice, this list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
* Redistributions in binary form must reproduce the above
|
|
12
|
+
copyright notice, this list of conditions and the following
|
|
13
|
+
disclaimer in the documentation and/or other materials provided
|
|
14
|
+
with the distribution.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
17
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
18
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
19
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
20
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
21
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
22
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
23
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
24
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
25
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
26
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
27
|
+
|
|
28
|
+
-----
|
|
29
|
+
|
|
30
|
+
cmark-gfm
|
|
31
|
+
|
|
32
|
+
derived from https://github.com/github/cmark
|
|
33
|
+
|
|
34
|
+
Copyright (c) 2014, John MacFarlane
|
|
35
|
+
|
|
36
|
+
All rights reserved.
|
|
37
|
+
|
|
38
|
+
Redistribution and use in source and binary forms, with or without
|
|
39
|
+
modification, are permitted provided that the following conditions are met:
|
|
40
|
+
|
|
41
|
+
* Redistributions of source code must retain the above copyright
|
|
42
|
+
notice, this list of conditions and the following disclaimer.
|
|
43
|
+
|
|
44
|
+
* Redistributions in binary form must reproduce the above
|
|
45
|
+
copyright notice, this list of conditions and the following
|
|
46
|
+
disclaimer in the documentation and/or other materials provided
|
|
47
|
+
with the distribution.
|
|
48
|
+
|
|
49
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
50
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
51
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
52
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
53
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
54
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
55
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
56
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
57
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
58
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
59
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
60
|
+
|
|
61
|
+
-----
|
|
62
|
+
|
|
63
|
+
houdini.h, houdini_href_e.c, houdini_html_e.c, houdini_html_u.c
|
|
64
|
+
|
|
65
|
+
derive from https://github.com/vmg/houdini (with some modifications)
|
|
66
|
+
|
|
67
|
+
Copyright (C) 2012 Vicent MartÃ
|
|
68
|
+
|
|
69
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
70
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
71
|
+
the Software without restriction, including without limitation the rights to
|
|
72
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
73
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
74
|
+
so, subject to the following conditions:
|
|
75
|
+
|
|
76
|
+
The above copyright notice and this permission notice shall be included in all
|
|
77
|
+
copies or substantial portions of the Software.
|
|
78
|
+
|
|
79
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
80
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
81
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
82
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
83
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
84
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
85
|
+
SOFTWARE.
|
|
86
|
+
|
|
87
|
+
-----
|
|
88
|
+
|
|
89
|
+
buffer.h, buffer.c, chunk.h
|
|
90
|
+
|
|
91
|
+
are derived from code (C) 2012 Github, Inc.
|
|
92
|
+
|
|
93
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
94
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
95
|
+
the Software without restriction, including without limitation the rights to
|
|
96
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
97
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
98
|
+
so, subject to the following conditions:
|
|
99
|
+
|
|
100
|
+
The above copyright notice and this permission notice shall be included in all
|
|
101
|
+
copies or substantial portions of the Software.
|
|
102
|
+
|
|
103
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
104
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
105
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
106
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
107
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
108
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
109
|
+
SOFTWARE.
|
|
110
|
+
|
|
111
|
+
-----
|
|
112
|
+
|
|
113
|
+
utf8.c and utf8.c
|
|
114
|
+
|
|
115
|
+
are derived from utf8proc
|
|
116
|
+
(<http://www.public-software-group.org/utf8proc>),
|
|
117
|
+
(C) 2009 Public Software Group e. V., Berlin, Germany.
|
|
118
|
+
|
|
119
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
120
|
+
copy of this software and associated documentation files (the "Software"),
|
|
121
|
+
to deal in the Software without restriction, including without limitation
|
|
122
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
123
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
|
124
|
+
Software is furnished to do so, subject to the following conditions:
|
|
125
|
+
|
|
126
|
+
The above copyright notice and this permission notice shall be included in
|
|
127
|
+
all copies or substantial portions of the Software.
|
|
128
|
+
|
|
129
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
130
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
131
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
132
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
133
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
134
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
135
|
+
DEALINGS IN THE SOFTWARE.
|
|
136
|
+
|
|
137
|
+
-----
|
|
138
|
+
|
|
139
|
+
The normalization code in normalize.py was derived from the
|
|
140
|
+
markdowntest project, Copyright 2013 Karl Dubost:
|
|
141
|
+
|
|
142
|
+
The MIT License (MIT)
|
|
143
|
+
|
|
144
|
+
Copyright (c) 2013 Karl Dubost
|
|
145
|
+
|
|
146
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
147
|
+
a copy of this software and associated documentation files (the
|
|
148
|
+
"Software"), to deal in the Software without restriction, including
|
|
149
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
150
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
151
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
152
|
+
the following conditions:
|
|
153
|
+
|
|
154
|
+
The above copyright notice and this permission notice shall be
|
|
155
|
+
included in all copies or substantial portions of the Software.
|
|
156
|
+
|
|
157
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
158
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
159
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
160
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
161
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
162
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
163
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
164
|
+
|
|
165
|
+
-----
|
|
166
|
+
|
|
167
|
+
The CommonMark spec (test/spec.txt) is
|
|
168
|
+
|
|
169
|
+
Copyright (C) 2014-15 John MacFarlane
|
|
170
|
+
|
|
171
|
+
Released under the Creative Commons CC-BY-SA 4.0 license:
|
|
172
|
+
<http://creativecommons.org/licenses/by-sa/4.0/>.
|
|
173
|
+
|
|
174
|
+
-----
|
|
175
|
+
|
|
176
|
+
The test software in test/ is
|
|
177
|
+
|
|
178
|
+
Copyright (c) 2014, John MacFarlane
|
|
179
|
+
|
|
180
|
+
All rights reserved.
|
|
181
|
+
|
|
182
|
+
Redistribution and use in source and binary forms, with or without
|
|
183
|
+
modification, are permitted provided that the following conditions are met:
|
|
184
|
+
|
|
185
|
+
* Redistributions of source code must retain the above copyright
|
|
186
|
+
notice, this list of conditions and the following disclaimer.
|
|
187
|
+
|
|
188
|
+
* Redistributions in binary form must reproduce the above
|
|
189
|
+
copyright notice, this list of conditions and the following
|
|
190
|
+
disclaimer in the documentation and/or other materials provided
|
|
191
|
+
with the distribution.
|
|
192
|
+
|
|
193
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
194
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
195
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
196
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
197
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
198
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
199
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
200
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
201
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
202
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
203
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|