cmark-render 0.2.0__tar.gz → 0.2.1__tar.gz
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.
- {cmark_render-0.2.0/src/cmark_render.egg-info → cmark_render-0.2.1}/PKG-INFO +5 -4
- {cmark_render-0.2.0 → cmark_render-0.2.1}/README.md +4 -3
- {cmark_render-0.2.0 → cmark_render-0.2.1}/pyproject.toml +1 -1
- {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render/_cmark.c +5 -2
- {cmark_render-0.2.0 → cmark_render-0.2.1/src/cmark_render.egg-info}/PKG-INFO +5 -4
- {cmark_render-0.2.0 → cmark_render-0.2.1}/LICENSE +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/MANIFEST.in +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/setup.cfg +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/setup.py +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render/__init__.py +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render/_cmark.pyi +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render/py.typed +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render.egg-info/SOURCES.txt +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render.egg-info/dependency_links.txt +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render.egg-info/top_level.txt +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/tests/test_render.py +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/COPYING +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/UPSTREAM +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/autolink.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/autolink.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/cmark-gfm-core-extensions.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/core-extensions.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/ext_scanners.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/ext_scanners.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/strikethrough.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/strikethrough.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/table.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/table.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/tagfilter.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/tagfilter.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/tasklist.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/tasklist.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/generated/cmark-gfm_export.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/generated/cmark-gfm_version.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/generated/config.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/arena.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/blocks.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/buffer.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/buffer.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/case_fold_switch.inc +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/chunk.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/cmark-gfm-extension_api.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/cmark-gfm.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/cmark.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/cmark_ctype.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/cmark_ctype.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/commonmark.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/entities.inc +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/footnotes.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/footnotes.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/houdini.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/houdini_href_e.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/houdini_html_e.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/houdini_html_u.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/html.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/html.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/inlines.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/inlines.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/iterator.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/iterator.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/latex.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/linked_list.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/man.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/map.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/map.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/node.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/node.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/parser.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/plaintext.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/plugin.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/plugin.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/references.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/references.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/registry.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/registry.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/render.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/render.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/scanners.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/scanners.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/syntax_extension.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/syntax_extension.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/utf8.c +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/utf8.h +0 -0
- {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/xml.c +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmark-render
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Fast, leak-free markdown to HTML with a vendored cmark-gfm (tables, ~~strikethrough~~, raw HTML).
|
|
5
5
|
Author: Zachary Juang
|
|
6
6
|
License-Expression: BSD-2-Clause
|
|
@@ -82,9 +82,10 @@ An unknown bit raises `ValueError`.
|
|
|
82
82
|
Every render frees its syntax tree and rendered HTML, so memory stays flat
|
|
83
83
|
however many documents you render.
|
|
84
84
|
|
|
85
|
-
It is safe to use with threads and `fork()`. Renders run without the GIL
|
|
86
|
-
|
|
87
|
-
characters that changes during each parse
|
|
85
|
+
It is safe to use with threads and `fork()`. Renders run without the GIL.
|
|
86
|
+
Parsing runs one at a time, because cmark-gfm keeps a global table of special
|
|
87
|
+
characters that changes during each parse, but writing the HTML runs in
|
|
88
|
+
parallel. A `pthread_atfork` handler stops a
|
|
88
89
|
child process from inheriting a held lock.
|
|
89
90
|
|
|
90
91
|
## Install
|
|
@@ -63,9 +63,10 @@ An unknown bit raises `ValueError`.
|
|
|
63
63
|
Every render frees its syntax tree and rendered HTML, so memory stays flat
|
|
64
64
|
however many documents you render.
|
|
65
65
|
|
|
66
|
-
It is safe to use with threads and `fork()`. Renders run without the GIL
|
|
67
|
-
|
|
68
|
-
characters that changes during each parse
|
|
66
|
+
It is safe to use with threads and `fork()`. Renders run without the GIL.
|
|
67
|
+
Parsing runs one at a time, because cmark-gfm keeps a global table of special
|
|
68
|
+
characters that changes during each parse, but writing the HTML runs in
|
|
69
|
+
parallel. A `pthread_atfork` handler stops a
|
|
69
70
|
child process from inheriting a held lock.
|
|
70
71
|
|
|
71
72
|
## Install
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cmark-render"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "Fast, leak-free markdown to HTML with a vendored cmark-gfm (tables, ~~strikethrough~~, raw HTML)."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.14"
|
|
@@ -33,7 +33,8 @@ static cmark_syntax_extension *extensions[N_EXTENSIONS];
|
|
|
33
33
|
/* While parsing inlines, cmark adds each extension's characters ("~" for
|
|
34
34
|
* strikethrough) to a global table and clears them after
|
|
35
35
|
* (cmark_manage_extensions_special_characters), so a concurrent parse could
|
|
36
|
-
* lose its strikethrough. Renders run without the GIL, one at a
|
|
36
|
+
* lose its strikethrough. Renders run without the GIL, and parses one at a
|
|
37
|
+
* time. */
|
|
37
38
|
static pthread_mutex_t render_lock = PTHREAD_MUTEX_INITIALIZER;
|
|
38
39
|
|
|
39
40
|
/* A fork while another thread holds render_lock would leave the child with a
|
|
@@ -125,13 +126,15 @@ static PyObject *render_html(PyObject *module, PyObject *args,
|
|
|
125
126
|
cmark_parser_feed(parser, text, (size_t)length);
|
|
126
127
|
/* The parser hands the tree to the caller; cmark_parser_free leaves it. */
|
|
127
128
|
cmark_node *document = cmark_parser_finish(parser);
|
|
129
|
+
/* finish has cleared the special characters again, and rendering only
|
|
130
|
+
* reads the tree and the extensions, so it runs alongside other parses. */
|
|
131
|
+
pthread_mutex_unlock(&render_lock);
|
|
128
132
|
if (document != NULL) {
|
|
129
133
|
html = cmark_render_html(document, options,
|
|
130
134
|
cmark_parser_get_syntax_extensions(parser));
|
|
131
135
|
cmark_node_free(document);
|
|
132
136
|
}
|
|
133
137
|
cmark_parser_free(parser);
|
|
134
|
-
pthread_mutex_unlock(&render_lock);
|
|
135
138
|
Py_END_ALLOW_THREADS
|
|
136
139
|
|
|
137
140
|
if (html == NULL) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmark-render
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Fast, leak-free markdown to HTML with a vendored cmark-gfm (tables, ~~strikethrough~~, raw HTML).
|
|
5
5
|
Author: Zachary Juang
|
|
6
6
|
License-Expression: BSD-2-Clause
|
|
@@ -82,9 +82,10 @@ An unknown bit raises `ValueError`.
|
|
|
82
82
|
Every render frees its syntax tree and rendered HTML, so memory stays flat
|
|
83
83
|
however many documents you render.
|
|
84
84
|
|
|
85
|
-
It is safe to use with threads and `fork()`. Renders run without the GIL
|
|
86
|
-
|
|
87
|
-
characters that changes during each parse
|
|
85
|
+
It is safe to use with threads and `fork()`. Renders run without the GIL.
|
|
86
|
+
Parsing runs one at a time, because cmark-gfm keeps a global table of special
|
|
87
|
+
characters that changes during each parse, but writing the HTML runs in
|
|
88
|
+
parallel. A `pthread_atfork` handler stops a
|
|
88
89
|
child process from inheriting a held lock.
|
|
89
90
|
|
|
90
91
|
## Install
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/cmark-gfm-core-extensions.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|