commonmarker 0.17.7 → 0.17.7.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of commonmarker might be problematic. Click here for more details.

Files changed (337) hide show
  1. checksums.yaml +4 -4
  2. data/commonmarker.gemspec +1 -1
  3. data/lib/commonmarker/version.rb +1 -1
  4. metadata +2 -335
  5. data/ext/commonmarker/cmark-upstream/CMakeLists.txt +0 -44
  6. data/ext/commonmarker/cmark-upstream/COPYING +0 -170
  7. data/ext/commonmarker/cmark-upstream/FindAsan.cmake +0 -74
  8. data/ext/commonmarker/cmark-upstream/Makefile +0 -226
  9. data/ext/commonmarker/cmark-upstream/Makefile.nmake +0 -36
  10. data/ext/commonmarker/cmark-upstream/README.md +0 -206
  11. data/ext/commonmarker/cmark-upstream/api_test/CMakeLists.txt +0 -26
  12. data/ext/commonmarker/cmark-upstream/api_test/cplusplus.cpp +0 -15
  13. data/ext/commonmarker/cmark-upstream/api_test/cplusplus.h +0 -16
  14. data/ext/commonmarker/cmark-upstream/api_test/harness.c +0 -110
  15. data/ext/commonmarker/cmark-upstream/api_test/harness.h +0 -35
  16. data/ext/commonmarker/cmark-upstream/api_test/main.c +0 -1116
  17. data/ext/commonmarker/cmark-upstream/appveyor.yml +0 -17
  18. data/ext/commonmarker/cmark-upstream/bench/samples/block-bq-flat.md +0 -16
  19. data/ext/commonmarker/cmark-upstream/bench/samples/block-bq-nested.md +0 -13
  20. data/ext/commonmarker/cmark-upstream/bench/samples/block-code.md +0 -11
  21. data/ext/commonmarker/cmark-upstream/bench/samples/block-fences.md +0 -14
  22. data/ext/commonmarker/cmark-upstream/bench/samples/block-heading.md +0 -9
  23. data/ext/commonmarker/cmark-upstream/bench/samples/block-hr.md +0 -10
  24. data/ext/commonmarker/cmark-upstream/bench/samples/block-html.md +0 -32
  25. data/ext/commonmarker/cmark-upstream/bench/samples/block-lheading.md +0 -8
  26. data/ext/commonmarker/cmark-upstream/bench/samples/block-list-flat.md +0 -67
  27. data/ext/commonmarker/cmark-upstream/bench/samples/block-list-nested.md +0 -36
  28. data/ext/commonmarker/cmark-upstream/bench/samples/block-ref-flat.md +0 -15
  29. data/ext/commonmarker/cmark-upstream/bench/samples/block-ref-nested.md +0 -17
  30. data/ext/commonmarker/cmark-upstream/bench/samples/inline-autolink.md +0 -14
  31. data/ext/commonmarker/cmark-upstream/bench/samples/inline-backticks.md +0 -3
  32. data/ext/commonmarker/cmark-upstream/bench/samples/inline-em-flat.md +0 -5
  33. data/ext/commonmarker/cmark-upstream/bench/samples/inline-em-nested.md +0 -5
  34. data/ext/commonmarker/cmark-upstream/bench/samples/inline-em-worst.md +0 -5
  35. data/ext/commonmarker/cmark-upstream/bench/samples/inline-entity.md +0 -11
  36. data/ext/commonmarker/cmark-upstream/bench/samples/inline-escape.md +0 -15
  37. data/ext/commonmarker/cmark-upstream/bench/samples/inline-html.md +0 -44
  38. data/ext/commonmarker/cmark-upstream/bench/samples/inline-links-flat.md +0 -23
  39. data/ext/commonmarker/cmark-upstream/bench/samples/inline-links-nested.md +0 -13
  40. data/ext/commonmarker/cmark-upstream/bench/samples/inline-newlines.md +0 -24
  41. data/ext/commonmarker/cmark-upstream/bench/samples/lorem1.md +0 -13
  42. data/ext/commonmarker/cmark-upstream/bench/samples/rawtabs.md +0 -18
  43. data/ext/commonmarker/cmark-upstream/bench/statistics.py +0 -595
  44. data/ext/commonmarker/cmark-upstream/bench/stats.py +0 -19
  45. data/ext/commonmarker/cmark-upstream/benchmarks.md +0 -33
  46. data/ext/commonmarker/cmark-upstream/build/CMakeCache.txt +0 -478
  47. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeCCompiler.cmake +0 -71
  48. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeCXXCompiler.cmake +0 -73
  49. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_C.bin +0 -0
  50. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_CXX.bin +0 -0
  51. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeSystem.cmake +0 -15
  52. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdC/CMakeCCompilerId.c +0 -567
  53. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdC/a.out +0 -0
  54. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdCXX/CMakeCXXCompilerId.cpp +0 -539
  55. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdCXX/a.out +0 -0
  56. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
  57. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeError.log +0 -18
  58. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeOutput.log +0 -709
  59. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/Makefile.cmake +0 -157
  60. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/Makefile2 +0 -391
  61. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/TargetDirectories.txt +0 -48
  62. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/cmake.check_cache +0 -1
  63. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.bin +0 -0
  64. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.c +0 -34
  65. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.cxx +0 -405
  66. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/progress.marks +0 -1
  67. data/ext/commonmarker/cmark-upstream/build/CTestTestfile.cmake +0 -11
  68. data/ext/commonmarker/cmark-upstream/build/Makefile +0 -280
  69. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
  70. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/C.includecache +0 -134
  71. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/CXX.includecache +0 -38
  72. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/DependInfo.cmake +0 -38
  73. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/build.make +0 -169
  74. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/cmake_clean.cmake +0 -12
  75. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/cplusplus.cpp.o +0 -0
  76. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/depend.internal +0 -28
  77. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/depend.make +0 -28
  78. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/flags.make +0 -17
  79. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/harness.c.o +0 -0
  80. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/link.txt +0 -1
  81. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/main.c.o +0 -0
  82. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/progress.make +0 -5
  83. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/progress.marks +0 -1
  84. data/ext/commonmarker/cmark-upstream/build/api_test/Makefile +0 -302
  85. data/ext/commonmarker/cmark-upstream/build/api_test/api_test +0 -0
  86. data/ext/commonmarker/cmark-upstream/build/api_test/cmake_install.cmake +0 -29
  87. data/ext/commonmarker/cmark-upstream/build/cmake_install.cmake +0 -49
  88. data/ext/commonmarker/cmark-upstream/build/compile_commands.json +0 -352
  89. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
  90. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/Export/lib/cmake-gfmextensions/cmark-gfmextensions-release.cmake +0 -30
  91. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/Export/lib/cmake-gfmextensions/cmark-gfmextensions.cmake +0 -108
  92. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/C.includecache +0 -246
  93. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/DependInfo.cmake +0 -36
  94. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/autolink.c.o +0 -0
  95. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/build.make +0 -253
  96. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/cmake_clean.cmake +0 -16
  97. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/core-extensions.c.o +0 -0
  98. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/depend.internal +0 -96
  99. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/depend.make +0 -96
  100. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/ext_scanners.c.o +0 -0
  101. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/flags.make +0 -10
  102. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/link.txt +0 -1
  103. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/progress.make +0 -8
  104. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/strikethrough.c.o +0 -0
  105. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/table.c.o +0 -0
  106. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/tagfilter.c.o +0 -0
  107. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/C.includecache +0 -246
  108. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/DependInfo.cmake +0 -29
  109. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/autolink.c.o +0 -0
  110. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/build.make +0 -249
  111. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/cmake_clean.cmake +0 -15
  112. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/cmake_clean_target.cmake +0 -3
  113. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/core-extensions.c.o +0 -0
  114. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/depend.internal +0 -96
  115. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/depend.make +0 -96
  116. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/ext_scanners.c.o +0 -0
  117. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/flags.make +0 -10
  118. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/link.txt +0 -2
  119. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/progress.make +0 -8
  120. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/strikethrough.c.o +0 -0
  121. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/table.c.o +0 -0
  122. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/tagfilter.c.o +0 -0
  123. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/progress.marks +0 -1
  124. data/ext/commonmarker/cmark-upstream/build/extensions/Makefile +0 -426
  125. data/ext/commonmarker/cmark-upstream/build/extensions/cmake_install.cmake +0 -84
  126. data/ext/commonmarker/cmark-upstream/build/extensions/cmarkextensions_export.h +0 -42
  127. data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.0.28.3.gfm.11.dylib +0 -0
  128. data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.a +0 -0
  129. data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.dylib +0 -1
  130. data/ext/commonmarker/cmark-upstream/build/man/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
  131. data/ext/commonmarker/cmark-upstream/build/man/CMakeFiles/progress.marks +0 -1
  132. data/ext/commonmarker/cmark-upstream/build/man/Makefile +0 -196
  133. data/ext/commonmarker/cmark-upstream/build/man/cmake_install.cmake +0 -37
  134. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
  135. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/Export/lib/cmake/cmark-gfm-release.cmake +0 -38
  136. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/Export/lib/cmake/cmark-gfm.cmake +0 -95
  137. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/C.includecache +0 -156
  138. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/DependInfo.cmake +0 -30
  139. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/build.make +0 -115
  140. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/cmake_clean.cmake +0 -10
  141. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/depend.internal +0 -20
  142. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/depend.make +0 -20
  143. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/flags.make +0 -10
  144. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/link.txt +0 -1
  145. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/main.c.o +0 -0
  146. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/progress.make +0 -3
  147. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/C.includecache +0 -612
  148. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/DependInfo.cmake +0 -60
  149. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/arena.c.o +0 -0
  150. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/blocks.c.o +0 -0
  151. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/buffer.c.o +0 -0
  152. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/build.make +0 -819
  153. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmake_clean.cmake +0 -37
  154. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmark.c.o +0 -0
  155. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmark_ctype.c.o +0 -0
  156. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/commonmark.c.o +0 -0
  157. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/depend.internal +0 -319
  158. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/depend.make +0 -319
  159. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/flags.make +0 -10
  160. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/footnotes.c.o +0 -0
  161. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_href_e.c.o +0 -0
  162. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_html_e.c.o +0 -0
  163. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_html_u.c.o +0 -0
  164. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/html.c.o +0 -0
  165. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/inlines.c.o +0 -0
  166. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/iterator.c.o +0 -0
  167. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/latex.c.o +0 -0
  168. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/link.txt +0 -1
  169. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/linked_list.c.o +0 -0
  170. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/man.c.o +0 -0
  171. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/map.c.o +0 -0
  172. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/node.c.o +0 -0
  173. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/plaintext.c.o +0 -0
  174. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/plugin.c.o +0 -0
  175. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/progress.make +0 -29
  176. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/references.c.o +0 -0
  177. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/registry.c.o +0 -0
  178. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/render.c.o +0 -0
  179. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/scanners.c.o +0 -0
  180. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/syntax_extension.c.o +0 -0
  181. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/utf8.c.o +0 -0
  182. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/xml.c.o +0 -0
  183. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/C.includecache +0 -612
  184. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/DependInfo.cmake +0 -54
  185. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/arena.c.o +0 -0
  186. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/blocks.c.o +0 -0
  187. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/buffer.c.o +0 -0
  188. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/build.make +0 -816
  189. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmake_clean.cmake +0 -36
  190. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmake_clean_target.cmake +0 -3
  191. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmark.c.o +0 -0
  192. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmark_ctype.c.o +0 -0
  193. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/commonmark.c.o +0 -0
  194. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/depend.internal +0 -319
  195. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/depend.make +0 -319
  196. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/flags.make +0 -10
  197. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/footnotes.c.o +0 -0
  198. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_href_e.c.o +0 -0
  199. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_html_e.c.o +0 -0
  200. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_html_u.c.o +0 -0
  201. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/html.c.o +0 -0
  202. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/inlines.c.o +0 -0
  203. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/iterator.c.o +0 -0
  204. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/latex.c.o +0 -0
  205. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/link.txt +0 -2
  206. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/linked_list.c.o +0 -0
  207. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/man.c.o +0 -0
  208. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/map.c.o +0 -0
  209. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/node.c.o +0 -0
  210. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/plaintext.c.o +0 -0
  211. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/plugin.c.o +0 -0
  212. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/progress.make +0 -29
  213. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/references.c.o +0 -0
  214. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/registry.c.o +0 -0
  215. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/render.c.o +0 -0
  216. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/scanners.c.o +0 -0
  217. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/syntax_extension.c.o +0 -0
  218. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/utf8.c.o +0 -0
  219. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/xml.c.o +0 -0
  220. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/progress.marks +0 -1
  221. data/ext/commonmarker/cmark-upstream/build/src/Makefile +0 -1165
  222. data/ext/commonmarker/cmark-upstream/build/src/cmake_install.cmake +0 -97
  223. data/ext/commonmarker/cmark-upstream/build/src/cmark-gfm +0 -0
  224. data/ext/commonmarker/cmark-upstream/build/src/cmark_export.h +0 -42
  225. data/ext/commonmarker/cmark-upstream/build/src/cmark_version.h +0 -8
  226. data/ext/commonmarker/cmark-upstream/build/src/config.h +0 -76
  227. data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.0.28.3.gfm.11.dylib +0 -0
  228. data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.a +0 -0
  229. data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.dylib +0 -1
  230. data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.pc +0 -10
  231. data/ext/commonmarker/cmark-upstream/build/testdir/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
  232. data/ext/commonmarker/cmark-upstream/build/testdir/CMakeFiles/progress.marks +0 -1
  233. data/ext/commonmarker/cmark-upstream/build/testdir/CTestTestfile.cmake +0 -17
  234. data/ext/commonmarker/cmark-upstream/build/testdir/Makefile +0 -196
  235. data/ext/commonmarker/cmark-upstream/build/testdir/cmake_install.cmake +0 -29
  236. data/ext/commonmarker/cmark-upstream/changelog.txt +0 -964
  237. data/ext/commonmarker/cmark-upstream/data/CaseFolding.txt +0 -1495
  238. data/ext/commonmarker/cmark-upstream/extensions/CMakeLists.txt +0 -124
  239. data/ext/commonmarker/cmark-upstream/extensions/autolink.c +0 -421
  240. data/ext/commonmarker/cmark-upstream/extensions/autolink.h +0 -8
  241. data/ext/commonmarker/cmark-upstream/extensions/core-extensions.c +0 -25
  242. data/ext/commonmarker/cmark-upstream/extensions/core-extensions.h +0 -25
  243. data/ext/commonmarker/cmark-upstream/extensions/ext_scanners.c +0 -941
  244. data/ext/commonmarker/cmark-upstream/extensions/ext_scanners.h +0 -22
  245. data/ext/commonmarker/cmark-upstream/extensions/ext_scanners.re +0 -74
  246. data/ext/commonmarker/cmark-upstream/extensions/strikethrough.c +0 -157
  247. data/ext/commonmarker/cmark-upstream/extensions/strikethrough.h +0 -9
  248. data/ext/commonmarker/cmark-upstream/extensions/table.c +0 -683
  249. data/ext/commonmarker/cmark-upstream/extensions/table.h +0 -8
  250. data/ext/commonmarker/cmark-upstream/extensions/tagfilter.c +0 -60
  251. data/ext/commonmarker/cmark-upstream/extensions/tagfilter.h +0 -8
  252. data/ext/commonmarker/cmark-upstream/man/CMakeLists.txt +0 -10
  253. data/ext/commonmarker/cmark-upstream/man/make_man_page.py +0 -133
  254. data/ext/commonmarker/cmark-upstream/man/man1/cmark-gfm.1 +0 -78
  255. data/ext/commonmarker/cmark-upstream/man/man3/cmark-gfm.3 +0 -989
  256. data/ext/commonmarker/cmark-upstream/nmake.bat +0 -1
  257. data/ext/commonmarker/cmark-upstream/src/CMakeLists.txt +0 -224
  258. data/ext/commonmarker/cmark-upstream/src/arena.c +0 -103
  259. data/ext/commonmarker/cmark-upstream/src/blocks.c +0 -1519
  260. data/ext/commonmarker/cmark-upstream/src/buffer.c +0 -279
  261. data/ext/commonmarker/cmark-upstream/src/buffer.h +0 -116
  262. data/ext/commonmarker/cmark-upstream/src/case_fold_switch.inc +0 -4327
  263. data/ext/commonmarker/cmark-upstream/src/chunk.h +0 -136
  264. data/ext/commonmarker/cmark-upstream/src/cmark.c +0 -55
  265. data/ext/commonmarker/cmark-upstream/src/cmark.h +0 -789
  266. data/ext/commonmarker/cmark-upstream/src/cmark_ctype.c +0 -44
  267. data/ext/commonmarker/cmark-upstream/src/cmark_ctype.h +0 -33
  268. data/ext/commonmarker/cmark-upstream/src/cmark_extension_api.h +0 -719
  269. data/ext/commonmarker/cmark-upstream/src/cmark_version.h.in +0 -8
  270. data/ext/commonmarker/cmark-upstream/src/commonmark.c +0 -508
  271. data/ext/commonmarker/cmark-upstream/src/config.h.in +0 -76
  272. data/ext/commonmarker/cmark-upstream/src/entities.inc +0 -2138
  273. data/ext/commonmarker/cmark-upstream/src/footnotes.c +0 -40
  274. data/ext/commonmarker/cmark-upstream/src/footnotes.h +0 -25
  275. data/ext/commonmarker/cmark-upstream/src/houdini.h +0 -57
  276. data/ext/commonmarker/cmark-upstream/src/houdini_href_e.c +0 -100
  277. data/ext/commonmarker/cmark-upstream/src/houdini_html_e.c +0 -66
  278. data/ext/commonmarker/cmark-upstream/src/houdini_html_u.c +0 -149
  279. data/ext/commonmarker/cmark-upstream/src/html.c +0 -457
  280. data/ext/commonmarker/cmark-upstream/src/html.h +0 -27
  281. data/ext/commonmarker/cmark-upstream/src/inlines.c +0 -1594
  282. data/ext/commonmarker/cmark-upstream/src/inlines.h +0 -29
  283. data/ext/commonmarker/cmark-upstream/src/iterator.c +0 -159
  284. data/ext/commonmarker/cmark-upstream/src/iterator.h +0 -27
  285. data/ext/commonmarker/cmark-upstream/src/latex.c +0 -466
  286. data/ext/commonmarker/cmark-upstream/src/libcmark-gfm.pc.in +0 -10
  287. data/ext/commonmarker/cmark-upstream/src/linked_list.c +0 -37
  288. data/ext/commonmarker/cmark-upstream/src/main.c +0 -276
  289. data/ext/commonmarker/cmark-upstream/src/man.c +0 -278
  290. data/ext/commonmarker/cmark-upstream/src/map.c +0 -122
  291. data/ext/commonmarker/cmark-upstream/src/map.h +0 -42
  292. data/ext/commonmarker/cmark-upstream/src/node.c +0 -965
  293. data/ext/commonmarker/cmark-upstream/src/node.h +0 -116
  294. data/ext/commonmarker/cmark-upstream/src/parser.h +0 -57
  295. data/ext/commonmarker/cmark-upstream/src/plaintext.c +0 -213
  296. data/ext/commonmarker/cmark-upstream/src/plugin.c +0 -36
  297. data/ext/commonmarker/cmark-upstream/src/plugin.h +0 -34
  298. data/ext/commonmarker/cmark-upstream/src/references.c +0 -42
  299. data/ext/commonmarker/cmark-upstream/src/references.h +0 -26
  300. data/ext/commonmarker/cmark-upstream/src/registry.c +0 -63
  301. data/ext/commonmarker/cmark-upstream/src/registry.h +0 -24
  302. data/ext/commonmarker/cmark-upstream/src/render.c +0 -202
  303. data/ext/commonmarker/cmark-upstream/src/render.h +0 -63
  304. data/ext/commonmarker/cmark-upstream/src/scanners.c +0 -18195
  305. data/ext/commonmarker/cmark-upstream/src/scanners.h +0 -64
  306. data/ext/commonmarker/cmark-upstream/src/scanners.re +0 -341
  307. data/ext/commonmarker/cmark-upstream/src/syntax_extension.c +0 -139
  308. data/ext/commonmarker/cmark-upstream/src/syntax_extension.h +0 -32
  309. data/ext/commonmarker/cmark-upstream/src/utf8.c +0 -317
  310. data/ext/commonmarker/cmark-upstream/src/utf8.h +0 -35
  311. data/ext/commonmarker/cmark-upstream/src/xml.c +0 -174
  312. data/ext/commonmarker/cmark-upstream/suppressions +0 -10
  313. data/ext/commonmarker/cmark-upstream/test/CMakeLists.txt +0 -98
  314. data/ext/commonmarker/cmark-upstream/test/afl_test_cases/test.md +0 -49
  315. data/ext/commonmarker/cmark-upstream/test/cmark-fuzz.c +0 -28
  316. data/ext/commonmarker/cmark-upstream/test/cmark.py +0 -103
  317. data/ext/commonmarker/cmark-upstream/test/entity_tests.py +0 -67
  318. data/ext/commonmarker/cmark-upstream/test/extensions.txt +0 -674
  319. data/ext/commonmarker/cmark-upstream/test/fuzzing_dictionary +0 -49
  320. data/ext/commonmarker/cmark-upstream/test/normalize.py +0 -194
  321. data/ext/commonmarker/cmark-upstream/test/pathological_tests.py +0 -145
  322. data/ext/commonmarker/cmark-upstream/test/regression.txt +0 -128
  323. data/ext/commonmarker/cmark-upstream/test/roundtrip_tests.py +0 -50
  324. data/ext/commonmarker/cmark-upstream/test/run-cmark-fuzz +0 -4
  325. data/ext/commonmarker/cmark-upstream/test/smart_punct.txt +0 -177
  326. data/ext/commonmarker/cmark-upstream/test/spec.txt +0 -9919
  327. data/ext/commonmarker/cmark-upstream/test/spec_tests.py +0 -152
  328. data/ext/commonmarker/cmark-upstream/toolchain-mingw32.cmake +0 -17
  329. data/ext/commonmarker/cmark-upstream/tools/Dockerfile +0 -41
  330. data/ext/commonmarker/cmark-upstream/tools/appveyor-build.bat +0 -13
  331. data/ext/commonmarker/cmark-upstream/tools/make_entities_inc.py +0 -32
  332. data/ext/commonmarker/cmark-upstream/tools/mkcasefold.pl +0 -22
  333. data/ext/commonmarker/cmark-upstream/why-cmark-and-not-x.md +0 -104
  334. data/ext/commonmarker/cmark-upstream/wrappers/wrapper.js +0 -6
  335. data/ext/commonmarker/cmark-upstream/wrappers/wrapper.py +0 -37
  336. data/ext/commonmarker/cmark-upstream/wrappers/wrapper.rb +0 -15
  337. data/ext/commonmarker/cmark-upstream/wrappers/wrapper.rkt +0 -190
@@ -1,136 +0,0 @@
1
- #ifndef CMARK_CHUNK_H
2
- #define CMARK_CHUNK_H
3
-
4
- #include <string.h>
5
- #include <stdlib.h>
6
- #include <assert.h>
7
- #include "cmark.h"
8
- #include "buffer.h"
9
- #include "memory.h"
10
- #include "cmark_ctype.h"
11
-
12
- #define CMARK_CHUNK_EMPTY \
13
- { NULL, 0, 0 }
14
-
15
- typedef struct cmark_chunk {
16
- unsigned char *data;
17
- bufsize_t len;
18
- bufsize_t alloc; // also implies a NULL-terminated string
19
- } cmark_chunk;
20
-
21
- static CMARK_INLINE void cmark_chunk_free(cmark_mem *mem, cmark_chunk *c) {
22
- if (c->alloc)
23
- mem->free(c->data);
24
-
25
- c->data = NULL;
26
- c->alloc = 0;
27
- c->len = 0;
28
- }
29
-
30
- static CMARK_INLINE void cmark_chunk_ltrim(cmark_chunk *c) {
31
- assert(!c->alloc);
32
-
33
- while (c->len && cmark_isspace(c->data[0])) {
34
- c->data++;
35
- c->len--;
36
- }
37
- }
38
-
39
- static CMARK_INLINE void cmark_chunk_rtrim(cmark_chunk *c) {
40
- assert(!c->alloc);
41
-
42
- while (c->len > 0) {
43
- if (!cmark_isspace(c->data[c->len - 1]))
44
- break;
45
-
46
- c->len--;
47
- }
48
- }
49
-
50
- static CMARK_INLINE void cmark_chunk_trim(cmark_chunk *c) {
51
- cmark_chunk_ltrim(c);
52
- cmark_chunk_rtrim(c);
53
- }
54
-
55
- static CMARK_INLINE bufsize_t cmark_chunk_strchr(cmark_chunk *ch, int c,
56
- bufsize_t offset) {
57
- const unsigned char *p =
58
- (unsigned char *)memchr(ch->data + offset, c, ch->len - offset);
59
- return p ? (bufsize_t)(p - ch->data) : ch->len;
60
- }
61
-
62
- static CMARK_INLINE const char *cmark_chunk_to_cstr(cmark_mem *mem,
63
- cmark_chunk *c) {
64
- unsigned char *str;
65
-
66
- if (c->alloc) {
67
- return (char *)c->data;
68
- }
69
- str = (unsigned char *)mem->calloc(c->len + 1, 1);
70
- if (c->len > 0) {
71
- memcpy(str, c->data, c->len);
72
- }
73
- str[c->len] = 0;
74
- c->data = str;
75
- c->alloc = 1;
76
-
77
- return (char *)str;
78
- }
79
-
80
- static CMARK_INLINE void cmark_chunk_set_cstr(cmark_mem *mem, cmark_chunk *c,
81
- const char *str) {
82
- unsigned char *old = c->alloc ? c->data : NULL;
83
- if (str == NULL) {
84
- c->len = 0;
85
- c->data = NULL;
86
- c->alloc = 0;
87
- } else {
88
- c->len = (bufsize_t)strlen(str);
89
- c->data = (unsigned char *)mem->calloc(c->len + 1, 1);
90
- c->alloc = 1;
91
- memcpy(c->data, str, c->len + 1);
92
- }
93
- if (old != NULL) {
94
- mem->free(old);
95
- }
96
- }
97
-
98
- static CMARK_INLINE cmark_chunk cmark_chunk_literal(const char *data) {
99
- bufsize_t len = data ? (bufsize_t)strlen(data) : 0;
100
- cmark_chunk c = {(unsigned char *)data, len, 0};
101
- return c;
102
- }
103
-
104
- static CMARK_INLINE cmark_chunk cmark_chunk_dup(const cmark_chunk *ch,
105
- bufsize_t pos, bufsize_t len) {
106
- cmark_chunk c = {ch->data + pos, len, 0};
107
- return c;
108
- }
109
-
110
- static CMARK_INLINE cmark_chunk cmark_chunk_buf_detach(cmark_strbuf *buf) {
111
- cmark_chunk c;
112
-
113
- c.len = buf->size;
114
- c.data = cmark_strbuf_detach(buf);
115
- c.alloc = 1;
116
-
117
- return c;
118
- }
119
-
120
- /* trim_new variants are to be used when the source chunk may or may not be
121
- * allocated; forces a newly allocated chunk. */
122
- static CMARK_INLINE cmark_chunk cmark_chunk_ltrim_new(cmark_mem *mem, cmark_chunk *c) {
123
- cmark_chunk r = cmark_chunk_dup(c, 0, c->len);
124
- cmark_chunk_ltrim(&r);
125
- cmark_chunk_to_cstr(mem, &r);
126
- return r;
127
- }
128
-
129
- static CMARK_INLINE cmark_chunk cmark_chunk_rtrim_new(cmark_mem *mem, cmark_chunk *c) {
130
- cmark_chunk r = cmark_chunk_dup(c, 0, c->len);
131
- cmark_chunk_rtrim(&r);
132
- cmark_chunk_to_cstr(mem, &r);
133
- return r;
134
- }
135
-
136
- #endif
@@ -1,55 +0,0 @@
1
- #include <stdlib.h>
2
- #include <assert.h>
3
- #include <stdio.h>
4
- #include "registry.h"
5
- #include "node.h"
6
- #include "houdini.h"
7
- #include "cmark.h"
8
- #include "buffer.h"
9
-
10
- cmark_node_type CMARK_NODE_LAST_BLOCK = CMARK_NODE_FOOTNOTE_DEFINITION;
11
- cmark_node_type CMARK_NODE_LAST_INLINE = CMARK_NODE_FOOTNOTE_REFERENCE;
12
-
13
- int cmark_version() { return CMARK_VERSION; }
14
-
15
- const char *cmark_version_string() { return CMARK_VERSION_STRING; }
16
-
17
- static void *xcalloc(size_t nmem, size_t size) {
18
- void *ptr = calloc(nmem, size);
19
- if (!ptr) {
20
- fprintf(stderr, "[cmark] calloc returned null pointer, aborting\n");
21
- abort();
22
- }
23
- return ptr;
24
- }
25
-
26
- static void *xrealloc(void *ptr, size_t size) {
27
- void *new_ptr = realloc(ptr, size);
28
- if (!new_ptr) {
29
- fprintf(stderr, "[cmark] realloc returned null pointer, aborting\n");
30
- abort();
31
- }
32
- return new_ptr;
33
- }
34
-
35
- static void xfree(void *ptr) {
36
- free(ptr);
37
- }
38
-
39
- cmark_mem CMARK_DEFAULT_MEM_ALLOCATOR = {xcalloc, xrealloc, xfree};
40
-
41
- cmark_mem *cmark_get_default_mem_allocator() {
42
- return &CMARK_DEFAULT_MEM_ALLOCATOR;
43
- }
44
-
45
- char *cmark_markdown_to_html(const char *text, size_t len, int options) {
46
- cmark_node *doc;
47
- char *result;
48
-
49
- doc = cmark_parse_document(text, len, options);
50
-
51
- result = cmark_render_html(doc, options, NULL);
52
- cmark_node_free(doc);
53
-
54
- return result;
55
- }
@@ -1,789 +0,0 @@
1
- #ifndef CMARK_CMARK_H
2
- #define CMARK_CMARK_H
3
-
4
- #include <stdio.h>
5
- #include <stdint.h>
6
- #include "cmark_export.h"
7
- #include "cmark_version.h"
8
-
9
- #ifdef __cplusplus
10
- extern "C" {
11
- #endif
12
-
13
- /** # NAME
14
- *
15
- * **cmark-gfm** - CommonMark parsing, manipulating, and rendering
16
- */
17
-
18
- /** # DESCRIPTION
19
- *
20
- * ## Simple Interface
21
- */
22
-
23
- /** Convert 'text' (assumed to be a UTF-8 encoded string with length
24
- * 'len') from CommonMark Markdown to HTML, returning a null-terminated,
25
- * UTF-8-encoded string. It is the caller's responsibility
26
- * to free the returned buffer.
27
- */
28
- CMARK_EXPORT
29
- char *cmark_markdown_to_html(const char *text, size_t len, int options);
30
-
31
- /** ## Node Structure
32
- */
33
-
34
- #define CMARK_NODE_TYPE_PRESENT (0x8000)
35
- #define CMARK_NODE_TYPE_BLOCK (CMARK_NODE_TYPE_PRESENT | 0x0000)
36
- #define CMARK_NODE_TYPE_INLINE (CMARK_NODE_TYPE_PRESENT | 0x4000)
37
- #define CMARK_NODE_TYPE_MASK (0xc000)
38
- #define CMARK_NODE_VALUE_MASK (0x3fff)
39
-
40
- typedef enum {
41
- /* Error status */
42
- CMARK_NODE_NONE = 0x0000,
43
-
44
- /* Block */
45
- CMARK_NODE_DOCUMENT = CMARK_NODE_TYPE_BLOCK | 0x0001,
46
- CMARK_NODE_BLOCK_QUOTE = CMARK_NODE_TYPE_BLOCK | 0x0002,
47
- CMARK_NODE_LIST = CMARK_NODE_TYPE_BLOCK | 0x0003,
48
- CMARK_NODE_ITEM = CMARK_NODE_TYPE_BLOCK | 0x0004,
49
- CMARK_NODE_CODE_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0005,
50
- CMARK_NODE_HTML_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0006,
51
- CMARK_NODE_CUSTOM_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0007,
52
- CMARK_NODE_PARAGRAPH = CMARK_NODE_TYPE_BLOCK | 0x0008,
53
- CMARK_NODE_HEADING = CMARK_NODE_TYPE_BLOCK | 0x0009,
54
- CMARK_NODE_THEMATIC_BREAK = CMARK_NODE_TYPE_BLOCK | 0x000a,
55
- CMARK_NODE_FOOTNOTE_DEFINITION = CMARK_NODE_TYPE_BLOCK | 0x000b,
56
-
57
- /* Inline */
58
- CMARK_NODE_TEXT = CMARK_NODE_TYPE_INLINE | 0x0001,
59
- CMARK_NODE_SOFTBREAK = CMARK_NODE_TYPE_INLINE | 0x0002,
60
- CMARK_NODE_LINEBREAK = CMARK_NODE_TYPE_INLINE | 0x0003,
61
- CMARK_NODE_CODE = CMARK_NODE_TYPE_INLINE | 0x0004,
62
- CMARK_NODE_HTML_INLINE = CMARK_NODE_TYPE_INLINE | 0x0005,
63
- CMARK_NODE_CUSTOM_INLINE = CMARK_NODE_TYPE_INLINE | 0x0006,
64
- CMARK_NODE_EMPH = CMARK_NODE_TYPE_INLINE | 0x0007,
65
- CMARK_NODE_STRONG = CMARK_NODE_TYPE_INLINE | 0x0008,
66
- CMARK_NODE_LINK = CMARK_NODE_TYPE_INLINE | 0x0009,
67
- CMARK_NODE_IMAGE = CMARK_NODE_TYPE_INLINE | 0x000a,
68
- CMARK_NODE_FOOTNOTE_REFERENCE = CMARK_NODE_TYPE_INLINE | 0x000b,
69
- } cmark_node_type;
70
-
71
- extern cmark_node_type CMARK_NODE_LAST_BLOCK;
72
- extern cmark_node_type CMARK_NODE_LAST_INLINE;
73
-
74
- /* For backwards compatibility: */
75
- #define CMARK_NODE_HEADER CMARK_NODE_HEADING
76
- #define CMARK_NODE_HRULE CMARK_NODE_THEMATIC_BREAK
77
- #define CMARK_NODE_HTML CMARK_NODE_HTML_BLOCK
78
- #define CMARK_NODE_INLINE_HTML CMARK_NODE_HTML_INLINE
79
-
80
- typedef enum {
81
- CMARK_NO_LIST,
82
- CMARK_BULLET_LIST,
83
- CMARK_ORDERED_LIST
84
- } cmark_list_type;
85
-
86
- typedef enum {
87
- CMARK_NO_DELIM,
88
- CMARK_PERIOD_DELIM,
89
- CMARK_PAREN_DELIM
90
- } cmark_delim_type;
91
-
92
- typedef struct cmark_node cmark_node;
93
- typedef struct cmark_parser cmark_parser;
94
- typedef struct cmark_iter cmark_iter;
95
-
96
- /**
97
- * ## Custom memory allocator support
98
- */
99
-
100
- /** Defines the memory allocation functions to be used by CMark
101
- * when parsing and allocating a document tree
102
- */
103
- typedef struct cmark_mem {
104
- void *(*calloc)(size_t, size_t);
105
- void *(*realloc)(void *, size_t);
106
- void (*free)(void *);
107
- } cmark_mem;
108
-
109
- /** The default memory allocator; uses the system's calloc,
110
- * realloc and free.
111
- */
112
- CMARK_EXPORT
113
- cmark_mem *cmark_get_default_mem_allocator();
114
-
115
- /** An arena allocator; uses system calloc to allocate large
116
- * slabs of memory. Memory in these slabs is not reused at all.
117
- */
118
- CMARK_EXPORT
119
- cmark_mem *cmark_get_arena_mem_allocator();
120
-
121
- /** Resets the arena allocator, quickly returning all used memory
122
- * to the operating system.
123
- */
124
- CMARK_EXPORT
125
- void cmark_arena_reset(void);
126
-
127
- /** Callback for freeing user data with a 'cmark_mem' context.
128
- */
129
- typedef void (*cmark_free_func) (cmark_mem *mem, void *user_data);
130
-
131
-
132
- /*
133
- * ## Basic data structures
134
- *
135
- * To keep dependencies to the strict minimum, libcmark implements
136
- * its own versions of "classic" data structures.
137
- */
138
-
139
- /**
140
- * ### Linked list
141
- */
142
-
143
- /** A generic singly linked list.
144
- */
145
- typedef struct _cmark_llist
146
- {
147
- struct _cmark_llist *next;
148
- void *data;
149
- } cmark_llist;
150
-
151
- /** Append an element to the linked list, return the possibly modified
152
- * head of the list.
153
- */
154
- CMARK_EXPORT
155
- cmark_llist * cmark_llist_append (cmark_mem * mem,
156
- cmark_llist * head,
157
- void * data);
158
-
159
- /** Free the list starting with 'head', calling 'free_func' with the
160
- * data pointer of each of its elements
161
- */
162
- CMARK_EXPORT
163
- void cmark_llist_free_full (cmark_mem * mem,
164
- cmark_llist * head,
165
- cmark_free_func free_func);
166
-
167
- /** Free the list starting with 'head'
168
- */
169
- CMARK_EXPORT
170
- void cmark_llist_free (cmark_mem * mem,
171
- cmark_llist * head);
172
-
173
- /**
174
- * ## Creating and Destroying Nodes
175
- */
176
-
177
- /** Creates a new node of type 'type'. Note that the node may have
178
- * other required properties, which it is the caller's responsibility
179
- * to assign.
180
- */
181
- CMARK_EXPORT cmark_node *cmark_node_new(cmark_node_type type);
182
-
183
- /** Same as `cmark_node_new`, but explicitly listing the memory
184
- * allocator used to allocate the node. Note: be sure to use the same
185
- * allocator for every node in a tree, or bad things can happen.
186
- */
187
- CMARK_EXPORT cmark_node *cmark_node_new_with_mem(cmark_node_type type,
188
- cmark_mem *mem);
189
-
190
- /** Frees the memory allocated for a node and any children.
191
- */
192
- CMARK_EXPORT void cmark_node_free(cmark_node *node);
193
-
194
- /**
195
- * ## Tree Traversal
196
- */
197
-
198
- /** Returns the next node in the sequence after 'node', or NULL if
199
- * there is none.
200
- */
201
- CMARK_EXPORT cmark_node *cmark_node_next(cmark_node *node);
202
-
203
- /** Returns the previous node in the sequence after 'node', or NULL if
204
- * there is none.
205
- */
206
- CMARK_EXPORT cmark_node *cmark_node_previous(cmark_node *node);
207
-
208
- /** Returns the parent of 'node', or NULL if there is none.
209
- */
210
- CMARK_EXPORT cmark_node *cmark_node_parent(cmark_node *node);
211
-
212
- /** Returns the first child of 'node', or NULL if 'node' has no children.
213
- */
214
- CMARK_EXPORT cmark_node *cmark_node_first_child(cmark_node *node);
215
-
216
- /** Returns the last child of 'node', or NULL if 'node' has no children.
217
- */
218
- CMARK_EXPORT cmark_node *cmark_node_last_child(cmark_node *node);
219
-
220
- /**
221
- * ## Iterator
222
- *
223
- * An iterator will walk through a tree of nodes, starting from a root
224
- * node, returning one node at a time, together with information about
225
- * whether the node is being entered or exited. The iterator will
226
- * first descend to a child node, if there is one. When there is no
227
- * child, the iterator will go to the next sibling. When there is no
228
- * next sibling, the iterator will return to the parent (but with
229
- * a 'cmark_event_type' of `CMARK_EVENT_EXIT`). The iterator will
230
- * return `CMARK_EVENT_DONE` when it reaches the root node again.
231
- * One natural application is an HTML renderer, where an `ENTER` event
232
- * outputs an open tag and an `EXIT` event outputs a close tag.
233
- * An iterator might also be used to transform an AST in some systematic
234
- * way, for example, turning all level-3 headings into regular paragraphs.
235
- *
236
- * void
237
- * usage_example(cmark_node *root) {
238
- * cmark_event_type ev_type;
239
- * cmark_iter *iter = cmark_iter_new(root);
240
- *
241
- * while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
242
- * cmark_node *cur = cmark_iter_get_node(iter);
243
- * // Do something with `cur` and `ev_type`
244
- * }
245
- *
246
- * cmark_iter_free(iter);
247
- * }
248
- *
249
- * Iterators will never return `EXIT` events for leaf nodes, which are nodes
250
- * of type:
251
- *
252
- * * CMARK_NODE_HTML_BLOCK
253
- * * CMARK_NODE_THEMATIC_BREAK
254
- * * CMARK_NODE_CODE_BLOCK
255
- * * CMARK_NODE_TEXT
256
- * * CMARK_NODE_SOFTBREAK
257
- * * CMARK_NODE_LINEBREAK
258
- * * CMARK_NODE_CODE
259
- * * CMARK_NODE_HTML_INLINE
260
- *
261
- * Nodes must only be modified after an `EXIT` event, or an `ENTER` event for
262
- * leaf nodes.
263
- */
264
-
265
- typedef enum {
266
- CMARK_EVENT_NONE,
267
- CMARK_EVENT_DONE,
268
- CMARK_EVENT_ENTER,
269
- CMARK_EVENT_EXIT
270
- } cmark_event_type;
271
-
272
- /** Creates a new iterator starting at 'root'. The current node and event
273
- * type are undefined until 'cmark_iter_next' is called for the first time.
274
- * The memory allocated for the iterator should be released using
275
- * 'cmark_iter_free' when it is no longer needed.
276
- */
277
- CMARK_EXPORT
278
- cmark_iter *cmark_iter_new(cmark_node *root);
279
-
280
- /** Frees the memory allocated for an iterator.
281
- */
282
- CMARK_EXPORT
283
- void cmark_iter_free(cmark_iter *iter);
284
-
285
- /** Advances to the next node and returns the event type (`CMARK_EVENT_ENTER`,
286
- * `CMARK_EVENT_EXIT` or `CMARK_EVENT_DONE`).
287
- */
288
- CMARK_EXPORT
289
- cmark_event_type cmark_iter_next(cmark_iter *iter);
290
-
291
- /** Returns the current node.
292
- */
293
- CMARK_EXPORT
294
- cmark_node *cmark_iter_get_node(cmark_iter *iter);
295
-
296
- /** Returns the current event type.
297
- */
298
- CMARK_EXPORT
299
- cmark_event_type cmark_iter_get_event_type(cmark_iter *iter);
300
-
301
- /** Returns the root node.
302
- */
303
- CMARK_EXPORT
304
- cmark_node *cmark_iter_get_root(cmark_iter *iter);
305
-
306
- /** Resets the iterator so that the current node is 'current' and
307
- * the event type is 'event_type'. The new current node must be a
308
- * descendant of the root node or the root node itself.
309
- */
310
- CMARK_EXPORT
311
- void cmark_iter_reset(cmark_iter *iter, cmark_node *current,
312
- cmark_event_type event_type);
313
-
314
- /**
315
- * ## Accessors
316
- */
317
-
318
- /** Returns the user data of 'node'.
319
- */
320
- CMARK_EXPORT void *cmark_node_get_user_data(cmark_node *node);
321
-
322
- /** Sets arbitrary user data for 'node'. Returns 1 on success,
323
- * 0 on failure.
324
- */
325
- CMARK_EXPORT int cmark_node_set_user_data(cmark_node *node, void *user_data);
326
-
327
- /** Set free function for user data */
328
- CMARK_EXPORT
329
- int cmark_node_set_user_data_free_func(cmark_node *node,
330
- cmark_free_func free_func);
331
-
332
- /** Returns the type of 'node', or `CMARK_NODE_NONE` on error.
333
- */
334
- CMARK_EXPORT cmark_node_type cmark_node_get_type(cmark_node *node);
335
-
336
- /** Like 'cmark_node_get_type', but returns a string representation
337
- of the type, or `"<unknown>"`.
338
- */
339
- CMARK_EXPORT
340
- const char *cmark_node_get_type_string(cmark_node *node);
341
-
342
- /** Returns the string contents of 'node', or an empty
343
- string if none is set. Returns NULL if called on a
344
- node that does not have string content.
345
- */
346
- CMARK_EXPORT const char *cmark_node_get_literal(cmark_node *node);
347
-
348
- /** Sets the string contents of 'node'. Returns 1 on success,
349
- * 0 on failure.
350
- */
351
- CMARK_EXPORT int cmark_node_set_literal(cmark_node *node, const char *content);
352
-
353
- /** Returns the heading level of 'node', or 0 if 'node' is not a heading.
354
- */
355
- CMARK_EXPORT int cmark_node_get_heading_level(cmark_node *node);
356
-
357
- /* For backwards compatibility */
358
- #define cmark_node_get_header_level cmark_node_get_heading_level
359
- #define cmark_node_set_header_level cmark_node_set_heading_level
360
-
361
- /** Sets the heading level of 'node', returning 1 on success and 0 on error.
362
- */
363
- CMARK_EXPORT int cmark_node_set_heading_level(cmark_node *node, int level);
364
-
365
- /** Returns the list type of 'node', or `CMARK_NO_LIST` if 'node'
366
- * is not a list.
367
- */
368
- CMARK_EXPORT cmark_list_type cmark_node_get_list_type(cmark_node *node);
369
-
370
- /** Sets the list type of 'node', returning 1 on success and 0 on error.
371
- */
372
- CMARK_EXPORT int cmark_node_set_list_type(cmark_node *node,
373
- cmark_list_type type);
374
-
375
- /** Returns the list delimiter type of 'node', or `CMARK_NO_DELIM` if 'node'
376
- * is not a list.
377
- */
378
- CMARK_EXPORT cmark_delim_type cmark_node_get_list_delim(cmark_node *node);
379
-
380
- /** Sets the list delimiter type of 'node', returning 1 on success and 0
381
- * on error.
382
- */
383
- CMARK_EXPORT int cmark_node_set_list_delim(cmark_node *node,
384
- cmark_delim_type delim);
385
-
386
- /** Returns starting number of 'node', if it is an ordered list, otherwise 0.
387
- */
388
- CMARK_EXPORT int cmark_node_get_list_start(cmark_node *node);
389
-
390
- /** Sets starting number of 'node', if it is an ordered list. Returns 1
391
- * on success, 0 on failure.
392
- */
393
- CMARK_EXPORT int cmark_node_set_list_start(cmark_node *node, int start);
394
-
395
- /** Returns 1 if 'node' is a tight list, 0 otherwise.
396
- */
397
- CMARK_EXPORT int cmark_node_get_list_tight(cmark_node *node);
398
-
399
- /** Sets the "tightness" of a list. Returns 1 on success, 0 on failure.
400
- */
401
- CMARK_EXPORT int cmark_node_set_list_tight(cmark_node *node, int tight);
402
-
403
- /** Returns the info string from a fenced code block.
404
- */
405
- CMARK_EXPORT const char *cmark_node_get_fence_info(cmark_node *node);
406
-
407
- /** Sets the info string in a fenced code block, returning 1 on
408
- * success and 0 on failure.
409
- */
410
- CMARK_EXPORT int cmark_node_set_fence_info(cmark_node *node, const char *info);
411
-
412
- /** Sets code blocks fencing details
413
- */
414
- CMARK_EXPORT int cmark_node_set_fenced(cmark_node * node, int fenced,
415
- int length, int offset, char character);
416
-
417
- /** Returns code blocks fencing details
418
- */
419
- CMARK_EXPORT int cmark_node_get_fenced(cmark_node *node, int *length, int *offset, char *character);
420
-
421
- /** Returns the URL of a link or image 'node', or an empty string
422
- if no URL is set. Returns NULL if called on a node that is
423
- not a link or image.
424
- */
425
- CMARK_EXPORT const char *cmark_node_get_url(cmark_node *node);
426
-
427
- /** Sets the URL of a link or image 'node'. Returns 1 on success,
428
- * 0 on failure.
429
- */
430
- CMARK_EXPORT int cmark_node_set_url(cmark_node *node, const char *url);
431
-
432
- /** Returns the title of a link or image 'node', or an empty
433
- string if no title is set. Returns NULL if called on a node
434
- that is not a link or image.
435
- */
436
- CMARK_EXPORT const char *cmark_node_get_title(cmark_node *node);
437
-
438
- /** Sets the title of a link or image 'node'. Returns 1 on success,
439
- * 0 on failure.
440
- */
441
- CMARK_EXPORT int cmark_node_set_title(cmark_node *node, const char *title);
442
-
443
- /** Returns the literal "on enter" text for a custom 'node', or
444
- an empty string if no on_enter is set. Returns NULL if called
445
- on a non-custom node.
446
- */
447
- CMARK_EXPORT const char *cmark_node_get_on_enter(cmark_node *node);
448
-
449
- /** Sets the literal text to render "on enter" for a custom 'node'.
450
- Any children of the node will be rendered after this text.
451
- Returns 1 on success 0 on failure.
452
- */
453
- CMARK_EXPORT int cmark_node_set_on_enter(cmark_node *node,
454
- const char *on_enter);
455
-
456
- /** Returns the literal "on exit" text for a custom 'node', or
457
- an empty string if no on_exit is set. Returns NULL if
458
- called on a non-custom node.
459
- */
460
- CMARK_EXPORT const char *cmark_node_get_on_exit(cmark_node *node);
461
-
462
- /** Sets the literal text to render "on exit" for a custom 'node'.
463
- Any children of the node will be rendered before this text.
464
- Returns 1 on success 0 on failure.
465
- */
466
- CMARK_EXPORT int cmark_node_set_on_exit(cmark_node *node, const char *on_exit);
467
-
468
- /** Returns the line on which 'node' begins.
469
- */
470
- CMARK_EXPORT int cmark_node_get_start_line(cmark_node *node);
471
-
472
- /** Returns the column at which 'node' begins.
473
- */
474
- CMARK_EXPORT int cmark_node_get_start_column(cmark_node *node);
475
-
476
- /** Returns the line on which 'node' ends.
477
- */
478
- CMARK_EXPORT int cmark_node_get_end_line(cmark_node *node);
479
-
480
- /** Returns the column at which 'node' ends.
481
- */
482
- CMARK_EXPORT int cmark_node_get_end_column(cmark_node *node);
483
-
484
- /**
485
- * ## Tree Manipulation
486
- */
487
-
488
- /** Unlinks a 'node', removing it from the tree, but not freeing its
489
- * memory. (Use 'cmark_node_free' for that.)
490
- */
491
- CMARK_EXPORT void cmark_node_unlink(cmark_node *node);
492
-
493
- /** Inserts 'sibling' before 'node'. Returns 1 on success, 0 on failure.
494
- */
495
- CMARK_EXPORT int cmark_node_insert_before(cmark_node *node,
496
- cmark_node *sibling);
497
-
498
- /** Inserts 'sibling' after 'node'. Returns 1 on success, 0 on failure.
499
- */
500
- CMARK_EXPORT int cmark_node_insert_after(cmark_node *node, cmark_node *sibling);
501
-
502
- /** Replaces 'oldnode' with 'newnode' and unlinks 'oldnode' (but does
503
- * not free its memory).
504
- * Returns 1 on success, 0 on failure.
505
- */
506
- CMARK_EXPORT int cmark_node_replace(cmark_node *oldnode, cmark_node *newnode);
507
-
508
- /** Adds 'child' to the beginning of the children of 'node'.
509
- * Returns 1 on success, 0 on failure.
510
- */
511
- CMARK_EXPORT int cmark_node_prepend_child(cmark_node *node, cmark_node *child);
512
-
513
- /** Adds 'child' to the end of the children of 'node'.
514
- * Returns 1 on success, 0 on failure.
515
- */
516
- CMARK_EXPORT int cmark_node_append_child(cmark_node *node, cmark_node *child);
517
-
518
- /** Consolidates adjacent text nodes.
519
- */
520
- CMARK_EXPORT void cmark_consolidate_text_nodes(cmark_node *root);
521
-
522
- /** Ensures a node and all its children own their own chunk memory.
523
- */
524
- CMARK_EXPORT void cmark_node_own(cmark_node *root);
525
-
526
- /**
527
- * ## Parsing
528
- *
529
- * Simple interface:
530
- *
531
- * cmark_node *document = cmark_parse_document("Hello *world*", 13,
532
- * CMARK_OPT_DEFAULT);
533
- *
534
- * Streaming interface:
535
- *
536
- * cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT);
537
- * FILE *fp = fopen("myfile.md", "rb");
538
- * while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
539
- * cmark_parser_feed(parser, buffer, bytes);
540
- * if (bytes < sizeof(buffer)) {
541
- * break;
542
- * }
543
- * }
544
- * document = cmark_parser_finish(parser);
545
- * cmark_parser_free(parser);
546
- */
547
-
548
- /** Creates a new parser object.
549
- */
550
- CMARK_EXPORT
551
- cmark_parser *cmark_parser_new(int options);
552
-
553
- /** Creates a new parser object with the given memory allocator
554
- */
555
- CMARK_EXPORT
556
- cmark_parser *cmark_parser_new_with_mem(int options, cmark_mem *mem);
557
-
558
- /** Frees memory allocated for a parser object.
559
- */
560
- CMARK_EXPORT
561
- void cmark_parser_free(cmark_parser *parser);
562
-
563
- /** Feeds a string of length 'len' to 'parser'.
564
- */
565
- CMARK_EXPORT
566
- void cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len);
567
-
568
- /** Finish parsing and return a pointer to a tree of nodes.
569
- */
570
- CMARK_EXPORT
571
- cmark_node *cmark_parser_finish(cmark_parser *parser);
572
-
573
- /** Parse a CommonMark document in 'buffer' of length 'len'.
574
- * Returns a pointer to a tree of nodes. The memory allocated for
575
- * the node tree should be released using 'cmark_node_free'
576
- * when it is no longer needed.
577
- */
578
- CMARK_EXPORT
579
- cmark_node *cmark_parse_document(const char *buffer, size_t len, int options);
580
-
581
- /** Parse a CommonMark document in file 'f', returning a pointer to
582
- * a tree of nodes. The memory allocated for the node tree should be
583
- * released using 'cmark_node_free' when it is no longer needed.
584
- */
585
- CMARK_EXPORT
586
- cmark_node *cmark_parse_file(FILE *f, int options);
587
-
588
- /**
589
- * ## Rendering
590
- */
591
-
592
- /** Render a 'node' tree as XML. It is the caller's responsibility
593
- * to free the returned buffer.
594
- */
595
- CMARK_EXPORT
596
- char *cmark_render_xml(cmark_node *root, int options);
597
-
598
- /** As for 'cmark_render_xml', but specifying the allocator to use for
599
- * the resulting string.
600
- */
601
- CMARK_EXPORT
602
- char *cmark_render_xml_with_mem(cmark_node *root, int options, cmark_mem *mem);
603
-
604
- /** Render a 'node' tree as an HTML fragment. It is up to the user
605
- * to add an appropriate header and footer. It is the caller's
606
- * responsibility to free the returned buffer.
607
- */
608
- CMARK_EXPORT
609
- char *cmark_render_html(cmark_node *root, int options, cmark_llist *extensions);
610
-
611
- /** As for 'cmark_render_html', but specifying the allocator to use for
612
- * the resulting string.
613
- */
614
- CMARK_EXPORT
615
- char *cmark_render_html_with_mem(cmark_node *root, int options, cmark_llist *extensions, cmark_mem *mem);
616
-
617
- /** Render a 'node' tree as a groff man page, without the header.
618
- * It is the caller's responsibility to free the returned buffer.
619
- */
620
- CMARK_EXPORT
621
- char *cmark_render_man(cmark_node *root, int options, int width);
622
-
623
- /** As for 'cmark_render_man', but specifying the allocator to use for
624
- * the resulting string.
625
- */
626
- CMARK_EXPORT
627
- char *cmark_render_man_with_mem(cmark_node *root, int options, int width, cmark_mem *mem);
628
-
629
- /** Render a 'node' tree as a commonmark document.
630
- * It is the caller's responsibility to free the returned buffer.
631
- */
632
- CMARK_EXPORT
633
- char *cmark_render_commonmark(cmark_node *root, int options, int width);
634
-
635
- /** As for 'cmark_render_commonmark', but specifying the allocator to use for
636
- * the resulting string.
637
- */
638
- CMARK_EXPORT
639
- char *cmark_render_commonmark_with_mem(cmark_node *root, int options, int width, cmark_mem *mem);
640
-
641
- /** Render a 'node' tree as a plain text document.
642
- * It is the caller's responsibility to free the returned buffer.
643
- */
644
- CMARK_EXPORT
645
- char *cmark_render_plaintext(cmark_node *root, int options, int width);
646
-
647
- /** As for 'cmark_render_plaintext', but specifying the allocator to use for
648
- * the resulting string.
649
- */
650
- CMARK_EXPORT
651
- char *cmark_render_plaintext_with_mem(cmark_node *root, int options, int width, cmark_mem *mem);
652
-
653
- /** Render a 'node' tree as a LaTeX document.
654
- * It is the caller's responsibility to free the returned buffer.
655
- */
656
- CMARK_EXPORT
657
- char *cmark_render_latex(cmark_node *root, int options, int width);
658
-
659
- /** As for 'cmark_render_latex', but specifying the allocator to use for
660
- * the resulting string.
661
- */
662
- CMARK_EXPORT
663
- char *cmark_render_latex_with_mem(cmark_node *root, int options, int width, cmark_mem *mem);
664
-
665
- /**
666
- * ## Options
667
- */
668
-
669
- /** Default options.
670
- */
671
- #define CMARK_OPT_DEFAULT 0
672
-
673
- /**
674
- * ### Options affecting rendering
675
- */
676
-
677
- /** Include a `data-sourcepos` attribute on all block elements.
678
- */
679
- #define CMARK_OPT_SOURCEPOS (1 << 1)
680
-
681
- /** Render `softbreak` elements as hard line breaks.
682
- */
683
- #define CMARK_OPT_HARDBREAKS (1 << 2)
684
-
685
- /** Suppress raw HTML and unsafe links (`javascript:`, `vbscript:`,
686
- * `file:`, and `data:`, except for `image/png`, `image/gif`,
687
- * `image/jpeg`, or `image/webp` mime types). Raw HTML is replaced
688
- * by a placeholder HTML comment. Unsafe links are replaced by
689
- * empty strings.
690
- */
691
- #define CMARK_OPT_SAFE (1 << 3)
692
-
693
- /** Render `softbreak` elements as spaces.
694
- */
695
- #define CMARK_OPT_NOBREAKS (1 << 4)
696
-
697
- /**
698
- * ### Options affecting parsing
699
- */
700
-
701
- /** Legacy option (no effect).
702
- */
703
- #define CMARK_OPT_NORMALIZE (1 << 8)
704
-
705
- /** Validate UTF-8 in the input before parsing, replacing illegal
706
- * sequences with the replacement character U+FFFD.
707
- */
708
- #define CMARK_OPT_VALIDATE_UTF8 (1 << 9)
709
-
710
- /** Convert straight quotes to curly, --- to em dashes, -- to en dashes.
711
- */
712
- #define CMARK_OPT_SMART (1 << 10)
713
-
714
- /** Use GitHub-style <pre lang="x"> tags for code blocks instead of <pre><code
715
- * class="language-x">.
716
- */
717
- #define CMARK_OPT_GITHUB_PRE_LANG (1 << 11)
718
-
719
- /** Be liberal in interpreting inline HTML tags.
720
- */
721
- #define CMARK_OPT_LIBERAL_HTML_TAG (1 << 12)
722
-
723
- /** Parse footnotes.
724
- */
725
- #define CMARK_OPT_FOOTNOTES (1 << 13)
726
-
727
- /**
728
- * ## Version information
729
- */
730
-
731
- /** The library version as integer for runtime checks. Also available as
732
- * macro CMARK_VERSION for compile time checks.
733
- *
734
- * * Bits 16-23 contain the major version.
735
- * * Bits 8-15 contain the minor version.
736
- * * Bits 0-7 contain the patchlevel.
737
- *
738
- * In hexadecimal format, the number 0x010203 represents version 1.2.3.
739
- */
740
- CMARK_EXPORT
741
- int cmark_version(void);
742
-
743
- /** The library version string for runtime checks. Also available as
744
- * macro CMARK_VERSION_STRING for compile time checks.
745
- */
746
- CMARK_EXPORT
747
- const char *cmark_version_string(void);
748
-
749
- /** # AUTHORS
750
- *
751
- * John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer.
752
- */
753
-
754
- #ifndef CMARK_NO_SHORT_NAMES
755
- #define NODE_DOCUMENT CMARK_NODE_DOCUMENT
756
- #define NODE_BLOCK_QUOTE CMARK_NODE_BLOCK_QUOTE
757
- #define NODE_LIST CMARK_NODE_LIST
758
- #define NODE_ITEM CMARK_NODE_ITEM
759
- #define NODE_CODE_BLOCK CMARK_NODE_CODE_BLOCK
760
- #define NODE_HTML_BLOCK CMARK_NODE_HTML_BLOCK
761
- #define NODE_CUSTOM_BLOCK CMARK_NODE_CUSTOM_BLOCK
762
- #define NODE_PARAGRAPH CMARK_NODE_PARAGRAPH
763
- #define NODE_HEADING CMARK_NODE_HEADING
764
- #define NODE_HEADER CMARK_NODE_HEADER
765
- #define NODE_THEMATIC_BREAK CMARK_NODE_THEMATIC_BREAK
766
- #define NODE_HRULE CMARK_NODE_HRULE
767
- #define NODE_TEXT CMARK_NODE_TEXT
768
- #define NODE_SOFTBREAK CMARK_NODE_SOFTBREAK
769
- #define NODE_LINEBREAK CMARK_NODE_LINEBREAK
770
- #define NODE_CODE CMARK_NODE_CODE
771
- #define NODE_HTML_INLINE CMARK_NODE_HTML_INLINE
772
- #define NODE_CUSTOM_INLINE CMARK_NODE_CUSTOM_INLINE
773
- #define NODE_EMPH CMARK_NODE_EMPH
774
- #define NODE_STRONG CMARK_NODE_STRONG
775
- #define NODE_LINK CMARK_NODE_LINK
776
- #define NODE_IMAGE CMARK_NODE_IMAGE
777
- #define BULLET_LIST CMARK_BULLET_LIST
778
- #define ORDERED_LIST CMARK_ORDERED_LIST
779
- #define PERIOD_DELIM CMARK_PERIOD_DELIM
780
- #define PAREN_DELIM CMARK_PAREN_DELIM
781
- #endif
782
-
783
- typedef int32_t bufsize_t;
784
-
785
- #ifdef __cplusplus
786
- }
787
- #endif
788
-
789
- #endif