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.
Files changed (84) hide show
  1. {cmark_render-0.2.0/src/cmark_render.egg-info → cmark_render-0.2.1}/PKG-INFO +5 -4
  2. {cmark_render-0.2.0 → cmark_render-0.2.1}/README.md +4 -3
  3. {cmark_render-0.2.0 → cmark_render-0.2.1}/pyproject.toml +1 -1
  4. {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render/_cmark.c +5 -2
  5. {cmark_render-0.2.0 → cmark_render-0.2.1/src/cmark_render.egg-info}/PKG-INFO +5 -4
  6. {cmark_render-0.2.0 → cmark_render-0.2.1}/LICENSE +0 -0
  7. {cmark_render-0.2.0 → cmark_render-0.2.1}/MANIFEST.in +0 -0
  8. {cmark_render-0.2.0 → cmark_render-0.2.1}/setup.cfg +0 -0
  9. {cmark_render-0.2.0 → cmark_render-0.2.1}/setup.py +0 -0
  10. {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render/__init__.py +0 -0
  11. {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render/_cmark.pyi +0 -0
  12. {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render/py.typed +0 -0
  13. {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render.egg-info/SOURCES.txt +0 -0
  14. {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render.egg-info/dependency_links.txt +0 -0
  15. {cmark_render-0.2.0 → cmark_render-0.2.1}/src/cmark_render.egg-info/top_level.txt +0 -0
  16. {cmark_render-0.2.0 → cmark_render-0.2.1}/tests/test_render.py +0 -0
  17. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/COPYING +0 -0
  18. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/UPSTREAM +0 -0
  19. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/autolink.c +0 -0
  20. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/autolink.h +0 -0
  21. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/cmark-gfm-core-extensions.h +0 -0
  22. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/core-extensions.c +0 -0
  23. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/ext_scanners.c +0 -0
  24. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/ext_scanners.h +0 -0
  25. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/strikethrough.c +0 -0
  26. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/strikethrough.h +0 -0
  27. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/table.c +0 -0
  28. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/table.h +0 -0
  29. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/tagfilter.c +0 -0
  30. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/tagfilter.h +0 -0
  31. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/tasklist.c +0 -0
  32. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/extensions/tasklist.h +0 -0
  33. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/generated/cmark-gfm_export.h +0 -0
  34. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/generated/cmark-gfm_version.h +0 -0
  35. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/generated/config.h +0 -0
  36. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/arena.c +0 -0
  37. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/blocks.c +0 -0
  38. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/buffer.c +0 -0
  39. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/buffer.h +0 -0
  40. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/case_fold_switch.inc +0 -0
  41. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/chunk.h +0 -0
  42. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/cmark-gfm-extension_api.h +0 -0
  43. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/cmark-gfm.h +0 -0
  44. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/cmark.c +0 -0
  45. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/cmark_ctype.c +0 -0
  46. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/cmark_ctype.h +0 -0
  47. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/commonmark.c +0 -0
  48. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/entities.inc +0 -0
  49. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/footnotes.c +0 -0
  50. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/footnotes.h +0 -0
  51. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/houdini.h +0 -0
  52. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/houdini_href_e.c +0 -0
  53. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/houdini_html_e.c +0 -0
  54. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/houdini_html_u.c +0 -0
  55. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/html.c +0 -0
  56. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/html.h +0 -0
  57. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/inlines.c +0 -0
  58. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/inlines.h +0 -0
  59. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/iterator.c +0 -0
  60. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/iterator.h +0 -0
  61. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/latex.c +0 -0
  62. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/linked_list.c +0 -0
  63. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/man.c +0 -0
  64. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/map.c +0 -0
  65. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/map.h +0 -0
  66. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/node.c +0 -0
  67. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/node.h +0 -0
  68. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/parser.h +0 -0
  69. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/plaintext.c +0 -0
  70. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/plugin.c +0 -0
  71. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/plugin.h +0 -0
  72. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/references.c +0 -0
  73. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/references.h +0 -0
  74. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/registry.c +0 -0
  75. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/registry.h +0 -0
  76. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/render.c +0 -0
  77. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/render.h +0 -0
  78. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/scanners.c +0 -0
  79. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/scanners.h +0 -0
  80. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/syntax_extension.c +0 -0
  81. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/syntax_extension.h +0 -0
  82. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/utf8.c +0 -0
  83. {cmark_render-0.2.0 → cmark_render-0.2.1}/vendor/cmark-gfm/src/utf8.h +0 -0
  84. {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.0
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
- but one at a time, because cmark-gfm keeps a global table of special
87
- characters that changes during each parse. A `pthread_atfork` handler stops a
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
- but one at a time, because cmark-gfm keeps a global table of special
68
- characters that changes during each parse. A `pthread_atfork` handler stops a
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.0"
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 time. */
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.0
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
- but one at a time, because cmark-gfm keeps a global table of special
87
- characters that changes during each parse. A `pthread_atfork` handler stops a
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