commonmarker 0.17.6 → 0.17.7

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 (405) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -7
  3. data/ext/commonmarker/{cmark/src/arena.c → arena.c} +0 -0
  4. data/ext/commonmarker/{cmark/extensions/autolink.c → autolink.c} +0 -0
  5. data/ext/commonmarker/{cmark/extensions/autolink.h → autolink.h} +0 -0
  6. data/ext/commonmarker/{cmark/src/blocks.c → blocks.c} +0 -0
  7. data/ext/commonmarker/{cmark/src/buffer.c → buffer.c} +0 -0
  8. data/ext/commonmarker/{cmark/src/buffer.h → buffer.h} +0 -0
  9. data/ext/commonmarker/{cmark/src/case_fold_switch.inc → case_fold_switch.inc} +0 -0
  10. data/ext/commonmarker/{cmark/src/chunk.h → chunk.h} +0 -0
  11. data/ext/commonmarker/{cmark → cmark-upstream}/CMakeLists.txt +0 -0
  12. data/ext/commonmarker/{cmark → cmark-upstream}/COPYING +0 -0
  13. data/ext/commonmarker/{cmark → cmark-upstream}/FindAsan.cmake +0 -0
  14. data/ext/commonmarker/{cmark → cmark-upstream}/Makefile +0 -0
  15. data/ext/commonmarker/{cmark → cmark-upstream}/Makefile.nmake +0 -0
  16. data/ext/commonmarker/{cmark → cmark-upstream}/README.md +0 -0
  17. data/ext/commonmarker/{cmark → cmark-upstream}/api_test/CMakeLists.txt +0 -0
  18. data/ext/commonmarker/{cmark → cmark-upstream}/api_test/cplusplus.cpp +0 -0
  19. data/ext/commonmarker/{cmark → cmark-upstream}/api_test/cplusplus.h +0 -0
  20. data/ext/commonmarker/{cmark → cmark-upstream}/api_test/harness.c +0 -0
  21. data/ext/commonmarker/{cmark → cmark-upstream}/api_test/harness.h +0 -0
  22. data/ext/commonmarker/{cmark → cmark-upstream}/api_test/main.c +0 -0
  23. data/ext/commonmarker/{cmark → cmark-upstream}/appveyor.yml +0 -0
  24. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-bq-flat.md +0 -0
  25. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-bq-nested.md +0 -0
  26. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-code.md +0 -0
  27. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-fences.md +0 -0
  28. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-heading.md +0 -0
  29. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-hr.md +0 -0
  30. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-html.md +0 -0
  31. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-lheading.md +0 -0
  32. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-list-flat.md +0 -0
  33. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-list-nested.md +0 -0
  34. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-ref-flat.md +0 -0
  35. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-ref-nested.md +0 -0
  36. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-autolink.md +0 -0
  37. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-backticks.md +0 -0
  38. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-em-flat.md +0 -0
  39. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-em-nested.md +0 -0
  40. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-em-worst.md +0 -0
  41. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-entity.md +0 -0
  42. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-escape.md +0 -0
  43. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-html.md +0 -0
  44. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-links-flat.md +0 -0
  45. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-links-nested.md +0 -0
  46. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-newlines.md +0 -0
  47. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/lorem1.md +0 -0
  48. data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/rawtabs.md +0 -0
  49. data/ext/commonmarker/{cmark → cmark-upstream}/bench/statistics.py +0 -0
  50. data/ext/commonmarker/{cmark → cmark-upstream}/bench/stats.py +0 -0
  51. data/ext/commonmarker/{cmark → cmark-upstream}/benchmarks.md +0 -0
  52. data/ext/commonmarker/cmark-upstream/build/CMakeCache.txt +478 -0
  53. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeCCompiler.cmake +71 -0
  54. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeCXXCompiler.cmake +73 -0
  55. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_C.bin +0 -0
  56. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_CXX.bin +0 -0
  57. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeSystem.cmake +15 -0
  58. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdC/CMakeCCompilerId.c +567 -0
  59. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdC/a.out +0 -0
  60. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdCXX/CMakeCXXCompilerId.cpp +539 -0
  61. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdCXX/a.out +0 -0
  62. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  63. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeError.log +18 -0
  64. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeOutput.log +709 -0
  65. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/Makefile.cmake +157 -0
  66. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/Makefile2 +391 -0
  67. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/TargetDirectories.txt +48 -0
  68. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/cmake.check_cache +1 -0
  69. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.bin +0 -0
  70. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.c +34 -0
  71. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.cxx +405 -0
  72. data/ext/commonmarker/cmark-upstream/build/CMakeFiles/progress.marks +1 -0
  73. data/ext/commonmarker/cmark-upstream/build/CTestTestfile.cmake +11 -0
  74. data/ext/commonmarker/cmark-upstream/build/Makefile +280 -0
  75. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  76. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/C.includecache +134 -0
  77. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/CXX.includecache +38 -0
  78. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/DependInfo.cmake +38 -0
  79. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/build.make +169 -0
  80. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/cmake_clean.cmake +12 -0
  81. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/cplusplus.cpp.o +0 -0
  82. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/depend.internal +28 -0
  83. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/depend.make +28 -0
  84. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/flags.make +17 -0
  85. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/harness.c.o +0 -0
  86. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/link.txt +1 -0
  87. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/main.c.o +0 -0
  88. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/progress.make +5 -0
  89. data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/progress.marks +1 -0
  90. data/ext/commonmarker/cmark-upstream/build/api_test/Makefile +302 -0
  91. data/ext/commonmarker/cmark-upstream/build/api_test/api_test +0 -0
  92. data/ext/commonmarker/cmark-upstream/build/api_test/cmake_install.cmake +29 -0
  93. data/ext/commonmarker/cmark-upstream/build/cmake_install.cmake +49 -0
  94. data/ext/commonmarker/cmark-upstream/build/compile_commands.json +352 -0
  95. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  96. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/Export/lib/cmake-gfmextensions/cmark-gfmextensions-release.cmake +30 -0
  97. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/Export/lib/cmake-gfmextensions/cmark-gfmextensions.cmake +108 -0
  98. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/C.includecache +246 -0
  99. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/DependInfo.cmake +36 -0
  100. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/autolink.c.o +0 -0
  101. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/build.make +253 -0
  102. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/cmake_clean.cmake +16 -0
  103. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/core-extensions.c.o +0 -0
  104. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/depend.internal +96 -0
  105. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/depend.make +96 -0
  106. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/ext_scanners.c.o +0 -0
  107. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/flags.make +10 -0
  108. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/link.txt +1 -0
  109. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/progress.make +8 -0
  110. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/strikethrough.c.o +0 -0
  111. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/table.c.o +0 -0
  112. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/tagfilter.c.o +0 -0
  113. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/C.includecache +246 -0
  114. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/DependInfo.cmake +29 -0
  115. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/autolink.c.o +0 -0
  116. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/build.make +249 -0
  117. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/cmake_clean.cmake +15 -0
  118. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/cmake_clean_target.cmake +3 -0
  119. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/core-extensions.c.o +0 -0
  120. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/depend.internal +96 -0
  121. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/depend.make +96 -0
  122. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/ext_scanners.c.o +0 -0
  123. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/flags.make +10 -0
  124. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/link.txt +2 -0
  125. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/progress.make +8 -0
  126. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/strikethrough.c.o +0 -0
  127. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/table.c.o +0 -0
  128. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/tagfilter.c.o +0 -0
  129. data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/progress.marks +1 -0
  130. data/ext/commonmarker/cmark-upstream/build/extensions/Makefile +426 -0
  131. data/ext/commonmarker/cmark-upstream/build/extensions/cmake_install.cmake +84 -0
  132. data/ext/commonmarker/cmark-upstream/build/extensions/cmarkextensions_export.h +42 -0
  133. data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.0.28.3.gfm.11.dylib +0 -0
  134. data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.a +0 -0
  135. data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.dylib +1 -0
  136. data/ext/commonmarker/cmark-upstream/build/man/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  137. data/ext/commonmarker/cmark-upstream/build/man/CMakeFiles/progress.marks +1 -0
  138. data/ext/commonmarker/cmark-upstream/build/man/Makefile +196 -0
  139. data/ext/commonmarker/cmark-upstream/build/man/cmake_install.cmake +37 -0
  140. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  141. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/Export/lib/cmake/cmark-gfm-release.cmake +38 -0
  142. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/Export/lib/cmake/cmark-gfm.cmake +95 -0
  143. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/C.includecache +156 -0
  144. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/DependInfo.cmake +30 -0
  145. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/build.make +115 -0
  146. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/cmake_clean.cmake +10 -0
  147. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/depend.internal +20 -0
  148. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/depend.make +20 -0
  149. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/flags.make +10 -0
  150. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/link.txt +1 -0
  151. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/main.c.o +0 -0
  152. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/progress.make +3 -0
  153. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/C.includecache +612 -0
  154. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/DependInfo.cmake +60 -0
  155. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/arena.c.o +0 -0
  156. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/blocks.c.o +0 -0
  157. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/buffer.c.o +0 -0
  158. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/build.make +819 -0
  159. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmake_clean.cmake +37 -0
  160. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmark.c.o +0 -0
  161. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmark_ctype.c.o +0 -0
  162. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/commonmark.c.o +0 -0
  163. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/depend.internal +319 -0
  164. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/depend.make +319 -0
  165. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/flags.make +10 -0
  166. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/footnotes.c.o +0 -0
  167. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_href_e.c.o +0 -0
  168. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_html_e.c.o +0 -0
  169. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_html_u.c.o +0 -0
  170. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/html.c.o +0 -0
  171. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/inlines.c.o +0 -0
  172. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/iterator.c.o +0 -0
  173. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/latex.c.o +0 -0
  174. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/link.txt +1 -0
  175. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/linked_list.c.o +0 -0
  176. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/man.c.o +0 -0
  177. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/map.c.o +0 -0
  178. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/node.c.o +0 -0
  179. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/plaintext.c.o +0 -0
  180. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/plugin.c.o +0 -0
  181. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/progress.make +29 -0
  182. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/references.c.o +0 -0
  183. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/registry.c.o +0 -0
  184. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/render.c.o +0 -0
  185. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/scanners.c.o +0 -0
  186. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/syntax_extension.c.o +0 -0
  187. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/utf8.c.o +0 -0
  188. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/xml.c.o +0 -0
  189. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/C.includecache +612 -0
  190. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/DependInfo.cmake +54 -0
  191. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/arena.c.o +0 -0
  192. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/blocks.c.o +0 -0
  193. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/buffer.c.o +0 -0
  194. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/build.make +816 -0
  195. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmake_clean.cmake +36 -0
  196. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmake_clean_target.cmake +3 -0
  197. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmark.c.o +0 -0
  198. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmark_ctype.c.o +0 -0
  199. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/commonmark.c.o +0 -0
  200. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/depend.internal +319 -0
  201. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/depend.make +319 -0
  202. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/flags.make +10 -0
  203. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/footnotes.c.o +0 -0
  204. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_href_e.c.o +0 -0
  205. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_html_e.c.o +0 -0
  206. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_html_u.c.o +0 -0
  207. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/html.c.o +0 -0
  208. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/inlines.c.o +0 -0
  209. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/iterator.c.o +0 -0
  210. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/latex.c.o +0 -0
  211. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/link.txt +2 -0
  212. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/linked_list.c.o +0 -0
  213. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/man.c.o +0 -0
  214. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/map.c.o +0 -0
  215. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/node.c.o +0 -0
  216. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/plaintext.c.o +0 -0
  217. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/plugin.c.o +0 -0
  218. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/progress.make +29 -0
  219. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/references.c.o +0 -0
  220. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/registry.c.o +0 -0
  221. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/render.c.o +0 -0
  222. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/scanners.c.o +0 -0
  223. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/syntax_extension.c.o +0 -0
  224. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/utf8.c.o +0 -0
  225. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/xml.c.o +0 -0
  226. data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/progress.marks +1 -0
  227. data/ext/commonmarker/cmark-upstream/build/src/Makefile +1165 -0
  228. data/ext/commonmarker/cmark-upstream/build/src/cmake_install.cmake +97 -0
  229. data/ext/commonmarker/cmark-upstream/build/src/cmark-gfm +0 -0
  230. data/ext/commonmarker/cmark-upstream/build/src/cmark_export.h +42 -0
  231. data/ext/commonmarker/cmark-upstream/build/src/cmark_version.h +8 -0
  232. data/ext/commonmarker/cmark-upstream/build/src/config.h +76 -0
  233. data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.0.28.3.gfm.11.dylib +0 -0
  234. data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.a +0 -0
  235. data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.dylib +1 -0
  236. data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.pc +10 -0
  237. data/ext/commonmarker/cmark-upstream/build/testdir/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  238. data/ext/commonmarker/cmark-upstream/build/testdir/CMakeFiles/progress.marks +1 -0
  239. data/ext/commonmarker/cmark-upstream/build/testdir/CTestTestfile.cmake +17 -0
  240. data/ext/commonmarker/cmark-upstream/build/testdir/Makefile +196 -0
  241. data/ext/commonmarker/cmark-upstream/build/testdir/cmake_install.cmake +29 -0
  242. data/ext/commonmarker/{cmark → cmark-upstream}/changelog.txt +0 -0
  243. data/ext/commonmarker/{cmark → cmark-upstream}/data/CaseFolding.txt +0 -0
  244. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/CMakeLists.txt +0 -0
  245. data/ext/commonmarker/cmark-upstream/extensions/autolink.c +421 -0
  246. data/ext/commonmarker/cmark-upstream/extensions/autolink.h +8 -0
  247. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/core-extensions.c +0 -0
  248. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/core-extensions.h +0 -0
  249. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/ext_scanners.c +0 -0
  250. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/ext_scanners.h +0 -0
  251. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/ext_scanners.re +0 -0
  252. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/strikethrough.c +0 -0
  253. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/strikethrough.h +0 -0
  254. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/table.c +0 -0
  255. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/table.h +0 -0
  256. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/tagfilter.c +0 -0
  257. data/ext/commonmarker/{cmark → cmark-upstream}/extensions/tagfilter.h +0 -0
  258. data/ext/commonmarker/{cmark → cmark-upstream}/man/CMakeLists.txt +0 -0
  259. data/ext/commonmarker/{cmark → cmark-upstream}/man/make_man_page.py +0 -0
  260. data/ext/commonmarker/{cmark → cmark-upstream}/man/man1/cmark-gfm.1 +0 -0
  261. data/ext/commonmarker/{cmark → cmark-upstream}/man/man3/cmark-gfm.3 +0 -0
  262. data/ext/commonmarker/{cmark → cmark-upstream}/nmake.bat +0 -0
  263. data/ext/commonmarker/{cmark → cmark-upstream}/src/CMakeLists.txt +0 -0
  264. data/ext/commonmarker/cmark-upstream/src/arena.c +103 -0
  265. data/ext/commonmarker/cmark-upstream/src/blocks.c +1519 -0
  266. data/ext/commonmarker/cmark-upstream/src/buffer.c +279 -0
  267. data/ext/commonmarker/cmark-upstream/src/buffer.h +116 -0
  268. data/ext/commonmarker/cmark-upstream/src/case_fold_switch.inc +4327 -0
  269. data/ext/commonmarker/cmark-upstream/src/chunk.h +136 -0
  270. data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark.c +0 -0
  271. data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark.h +0 -0
  272. data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_ctype.c +0 -0
  273. data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_ctype.h +0 -0
  274. data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_extension_api.h +0 -0
  275. data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_version.h.in +0 -0
  276. data/ext/commonmarker/{cmark → cmark-upstream}/src/commonmark.c +0 -0
  277. data/ext/commonmarker/{cmark → cmark-upstream}/src/config.h.in +0 -0
  278. data/ext/commonmarker/{cmark → cmark-upstream}/src/entities.inc +0 -0
  279. data/ext/commonmarker/{cmark → cmark-upstream}/src/footnotes.c +0 -0
  280. data/ext/commonmarker/{cmark → cmark-upstream}/src/footnotes.h +0 -0
  281. data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini.h +0 -0
  282. data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini_href_e.c +0 -0
  283. data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini_html_e.c +0 -0
  284. data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini_html_u.c +0 -0
  285. data/ext/commonmarker/{cmark → cmark-upstream}/src/html.c +0 -0
  286. data/ext/commonmarker/{cmark → cmark-upstream}/src/html.h +0 -0
  287. data/ext/commonmarker/{cmark → cmark-upstream}/src/inlines.c +8 -4
  288. data/ext/commonmarker/{cmark → cmark-upstream}/src/inlines.h +0 -0
  289. data/ext/commonmarker/{cmark → cmark-upstream}/src/iterator.c +0 -0
  290. data/ext/commonmarker/{cmark → cmark-upstream}/src/iterator.h +0 -0
  291. data/ext/commonmarker/{cmark → cmark-upstream}/src/latex.c +0 -0
  292. data/ext/commonmarker/{cmark → cmark-upstream}/src/libcmark-gfm.pc.in +0 -0
  293. data/ext/commonmarker/{cmark → cmark-upstream}/src/linked_list.c +0 -0
  294. data/ext/commonmarker/{cmark → cmark-upstream}/src/main.c +0 -0
  295. data/ext/commonmarker/{cmark → cmark-upstream}/src/man.c +0 -0
  296. data/ext/commonmarker/{cmark → cmark-upstream}/src/map.c +0 -0
  297. data/ext/commonmarker/{cmark → cmark-upstream}/src/map.h +0 -0
  298. data/ext/commonmarker/{cmark → cmark-upstream}/src/node.c +0 -0
  299. data/ext/commonmarker/{cmark → cmark-upstream}/src/node.h +0 -0
  300. data/ext/commonmarker/{cmark → cmark-upstream}/src/parser.h +0 -0
  301. data/ext/commonmarker/{cmark → cmark-upstream}/src/plaintext.c +0 -0
  302. data/ext/commonmarker/{cmark → cmark-upstream}/src/plugin.c +0 -0
  303. data/ext/commonmarker/{cmark → cmark-upstream}/src/plugin.h +0 -0
  304. data/ext/commonmarker/{cmark → cmark-upstream}/src/references.c +0 -0
  305. data/ext/commonmarker/{cmark → cmark-upstream}/src/references.h +0 -0
  306. data/ext/commonmarker/{cmark → cmark-upstream}/src/registry.c +0 -0
  307. data/ext/commonmarker/{cmark → cmark-upstream}/src/registry.h +0 -0
  308. data/ext/commonmarker/{cmark → cmark-upstream}/src/render.c +0 -0
  309. data/ext/commonmarker/{cmark → cmark-upstream}/src/render.h +0 -0
  310. data/ext/commonmarker/{cmark → cmark-upstream}/src/scanners.c +0 -0
  311. data/ext/commonmarker/{cmark → cmark-upstream}/src/scanners.h +0 -0
  312. data/ext/commonmarker/{cmark → cmark-upstream}/src/scanners.re +0 -0
  313. data/ext/commonmarker/{cmark → cmark-upstream}/src/syntax_extension.c +0 -0
  314. data/ext/commonmarker/{cmark → cmark-upstream}/src/syntax_extension.h +0 -0
  315. data/ext/commonmarker/{cmark → cmark-upstream}/src/utf8.c +0 -0
  316. data/ext/commonmarker/{cmark → cmark-upstream}/src/utf8.h +0 -0
  317. data/ext/commonmarker/{cmark → cmark-upstream}/src/xml.c +0 -0
  318. data/ext/commonmarker/{cmark → cmark-upstream}/suppressions +0 -0
  319. data/ext/commonmarker/{cmark → cmark-upstream}/test/CMakeLists.txt +0 -0
  320. data/ext/commonmarker/{cmark → cmark-upstream}/test/afl_test_cases/test.md +0 -0
  321. data/ext/commonmarker/{cmark → cmark-upstream}/test/cmark-fuzz.c +0 -0
  322. data/ext/commonmarker/{cmark → cmark-upstream}/test/cmark.py +0 -0
  323. data/ext/commonmarker/{cmark → cmark-upstream}/test/entity_tests.py +0 -0
  324. data/ext/commonmarker/{cmark → cmark-upstream}/test/extensions.txt +2 -2
  325. data/ext/commonmarker/{cmark → cmark-upstream}/test/fuzzing_dictionary +0 -0
  326. data/ext/commonmarker/{cmark → cmark-upstream}/test/normalize.py +0 -0
  327. data/ext/commonmarker/{cmark → cmark-upstream}/test/pathological_tests.py +0 -0
  328. data/ext/commonmarker/{cmark → cmark-upstream}/test/regression.txt +0 -0
  329. data/ext/commonmarker/{cmark → cmark-upstream}/test/roundtrip_tests.py +0 -0
  330. data/ext/commonmarker/{cmark → cmark-upstream}/test/run-cmark-fuzz +0 -0
  331. data/ext/commonmarker/{cmark → cmark-upstream}/test/smart_punct.txt +0 -0
  332. data/ext/commonmarker/{cmark → cmark-upstream}/test/spec.txt +0 -0
  333. data/ext/commonmarker/{cmark → cmark-upstream}/test/spec_tests.py +0 -0
  334. data/ext/commonmarker/{cmark → cmark-upstream}/toolchain-mingw32.cmake +0 -0
  335. data/ext/commonmarker/{cmark → cmark-upstream}/tools/Dockerfile +0 -0
  336. data/ext/commonmarker/{cmark → cmark-upstream}/tools/appveyor-build.bat +0 -0
  337. data/ext/commonmarker/{cmark → cmark-upstream}/tools/make_entities_inc.py +0 -0
  338. data/ext/commonmarker/{cmark → cmark-upstream}/tools/mkcasefold.pl +0 -0
  339. data/ext/commonmarker/{cmark → cmark-upstream}/why-cmark-and-not-x.md +0 -0
  340. data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.js +0 -0
  341. data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.py +0 -0
  342. data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.rb +0 -0
  343. data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.rkt +0 -0
  344. data/ext/commonmarker/cmark.c +55 -0
  345. data/ext/commonmarker/cmark.h +789 -0
  346. data/ext/commonmarker/cmark_ctype.c +44 -0
  347. data/ext/commonmarker/cmark_ctype.h +33 -0
  348. data/ext/commonmarker/cmark_export.h +42 -0
  349. data/ext/commonmarker/cmark_extension_api.h +719 -0
  350. data/ext/commonmarker/cmark_version.h +8 -0
  351. data/ext/commonmarker/cmarkextensions_export.h +42 -0
  352. data/ext/commonmarker/commonmark.c +508 -0
  353. data/ext/commonmarker/config.h +76 -0
  354. data/ext/commonmarker/core-extensions.c +25 -0
  355. data/ext/commonmarker/core-extensions.h +25 -0
  356. data/ext/commonmarker/entities.inc +2138 -0
  357. data/ext/commonmarker/ext_scanners.c +941 -0
  358. data/ext/commonmarker/ext_scanners.h +22 -0
  359. data/ext/commonmarker/extconf.rb +1 -48
  360. data/ext/commonmarker/footnotes.c +40 -0
  361. data/ext/commonmarker/footnotes.h +25 -0
  362. data/ext/commonmarker/houdini.h +57 -0
  363. data/ext/commonmarker/houdini_href_e.c +100 -0
  364. data/ext/commonmarker/houdini_html_e.c +66 -0
  365. data/ext/commonmarker/houdini_html_u.c +149 -0
  366. data/ext/commonmarker/html.c +457 -0
  367. data/ext/commonmarker/html.h +27 -0
  368. data/ext/commonmarker/inlines.c +1594 -0
  369. data/ext/commonmarker/inlines.h +29 -0
  370. data/ext/commonmarker/iterator.c +159 -0
  371. data/ext/commonmarker/iterator.h +27 -0
  372. data/ext/commonmarker/latex.c +466 -0
  373. data/ext/commonmarker/linked_list.c +37 -0
  374. data/ext/commonmarker/man.c +278 -0
  375. data/ext/commonmarker/map.c +122 -0
  376. data/ext/commonmarker/map.h +42 -0
  377. data/ext/commonmarker/node.c +965 -0
  378. data/ext/commonmarker/node.h +116 -0
  379. data/ext/commonmarker/parser.h +57 -0
  380. data/ext/commonmarker/plaintext.c +213 -0
  381. data/ext/commonmarker/plugin.c +36 -0
  382. data/ext/commonmarker/plugin.h +34 -0
  383. data/ext/commonmarker/references.c +42 -0
  384. data/ext/commonmarker/references.h +26 -0
  385. data/ext/commonmarker/registry.c +63 -0
  386. data/ext/commonmarker/registry.h +24 -0
  387. data/ext/commonmarker/render.c +202 -0
  388. data/ext/commonmarker/render.h +63 -0
  389. data/ext/commonmarker/scanners.c +18195 -0
  390. data/ext/commonmarker/scanners.h +64 -0
  391. data/ext/commonmarker/scanners.re +341 -0
  392. data/ext/commonmarker/strikethrough.c +157 -0
  393. data/ext/commonmarker/strikethrough.h +9 -0
  394. data/ext/commonmarker/syntax_extension.c +139 -0
  395. data/ext/commonmarker/syntax_extension.h +32 -0
  396. data/ext/commonmarker/table.c +683 -0
  397. data/ext/commonmarker/table.h +8 -0
  398. data/ext/commonmarker/tagfilter.c +60 -0
  399. data/ext/commonmarker/tagfilter.h +8 -0
  400. data/ext/commonmarker/utf8.c +317 -0
  401. data/ext/commonmarker/utf8.h +35 -0
  402. data/ext/commonmarker/xml.c +174 -0
  403. data/lib/commonmarker/version.rb +1 -1
  404. data/test/test_helper.rb +1 -1
  405. metadata +401 -145
@@ -0,0 +1,44 @@
1
+ #include <stdint.h>
2
+
3
+ #include "cmark_ctype.h"
4
+
5
+ /** 1 = space, 2 = punct, 3 = digit, 4 = alpha, 0 = other
6
+ */
7
+ static const uint8_t cmark_ctype_class[256] = {
8
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
9
+ /* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
10
+ /* 1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11
+ /* 2 */ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
12
+ /* 3 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2,
13
+ /* 4 */ 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
14
+ /* 5 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2,
15
+ /* 6 */ 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
16
+ /* 7 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 0,
17
+ /* 8 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
18
+ /* 9 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19
+ /* a */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
20
+ /* b */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
21
+ /* c */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
22
+ /* d */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
23
+ /* e */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
24
+ /* f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
25
+
26
+ /**
27
+ * Returns 1 if c is a "whitespace" character as defined by the spec.
28
+ */
29
+ int cmark_isspace(char c) { return cmark_ctype_class[(uint8_t)c] == 1; }
30
+
31
+ /**
32
+ * Returns 1 if c is an ascii punctuation character.
33
+ */
34
+ int cmark_ispunct(char c) { return cmark_ctype_class[(uint8_t)c] == 2; }
35
+
36
+ int cmark_isalnum(char c) {
37
+ uint8_t result;
38
+ result = cmark_ctype_class[(uint8_t)c];
39
+ return (result == 3 || result == 4);
40
+ }
41
+
42
+ int cmark_isdigit(char c) { return cmark_ctype_class[(uint8_t)c] == 3; }
43
+
44
+ int cmark_isalpha(char c) { return cmark_ctype_class[(uint8_t)c] == 4; }
@@ -0,0 +1,33 @@
1
+ #ifndef CMARK_CMARK_CTYPE_H
2
+ #define CMARK_CMARK_CTYPE_H
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ #include "cmark_export.h"
9
+
10
+ /** Locale-independent versions of functions from ctype.h.
11
+ * We want cmark to behave the same no matter what the system locale.
12
+ */
13
+
14
+ CMARK_EXPORT
15
+ int cmark_isspace(char c);
16
+
17
+ CMARK_EXPORT
18
+ int cmark_ispunct(char c);
19
+
20
+ CMARK_EXPORT
21
+ int cmark_isalnum(char c);
22
+
23
+ CMARK_EXPORT
24
+ int cmark_isdigit(char c);
25
+
26
+ CMARK_EXPORT
27
+ int cmark_isalpha(char c);
28
+
29
+ #ifdef __cplusplus
30
+ }
31
+ #endif
32
+
33
+ #endif
@@ -0,0 +1,42 @@
1
+
2
+ #ifndef CMARK_EXPORT_H
3
+ #define CMARK_EXPORT_H
4
+
5
+ #ifdef CMARK_STATIC_DEFINE
6
+ # define CMARK_EXPORT
7
+ # define CMARK_NO_EXPORT
8
+ #else
9
+ # ifndef CMARK_EXPORT
10
+ # ifdef libcmark_gfm_EXPORTS
11
+ /* We are building this library */
12
+ # define CMARK_EXPORT __attribute__((visibility("default")))
13
+ # else
14
+ /* We are using this library */
15
+ # define CMARK_EXPORT __attribute__((visibility("default")))
16
+ # endif
17
+ # endif
18
+
19
+ # ifndef CMARK_NO_EXPORT
20
+ # define CMARK_NO_EXPORT __attribute__((visibility("hidden")))
21
+ # endif
22
+ #endif
23
+
24
+ #ifndef CMARK_DEPRECATED
25
+ # define CMARK_DEPRECATED __attribute__ ((__deprecated__))
26
+ #endif
27
+
28
+ #ifndef CMARK_DEPRECATED_EXPORT
29
+ # define CMARK_DEPRECATED_EXPORT CMARK_EXPORT CMARK_DEPRECATED
30
+ #endif
31
+
32
+ #ifndef CMARK_DEPRECATED_NO_EXPORT
33
+ # define CMARK_DEPRECATED_NO_EXPORT CMARK_NO_EXPORT CMARK_DEPRECATED
34
+ #endif
35
+
36
+ #if 0 /* DEFINE_NO_DEPRECATED */
37
+ # ifndef CMARK_NO_DEPRECATED
38
+ # define CMARK_NO_DEPRECATED
39
+ # endif
40
+ #endif
41
+
42
+ #endif
@@ -0,0 +1,719 @@
1
+ #ifndef CMARK_CMARK_EXTENSION_API_H
2
+ #define CMARK_CMARK_EXTENSION_API_H
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ #include <cmark.h>
9
+
10
+ struct cmark_renderer;
11
+ struct cmark_html_renderer;
12
+ struct cmark_chunk;
13
+
14
+ /**
15
+ * ## Extension Support
16
+ *
17
+ * While the "core" of libcmark is strictly compliant with the
18
+ * specification, an API is provided for extension writers to
19
+ * hook into the parsing process.
20
+ *
21
+ * It should be noted that the cmark_node API already offers
22
+ * room for customization, with methods offered to traverse and
23
+ * modify the AST, and even define custom blocks.
24
+ * When the desired customization is achievable in an error-proof
25
+ * way using that API, it should be the preferred method.
26
+ *
27
+ * The following API requires a more in-depth understanding
28
+ * of libcmark's parsing strategy, which is exposed
29
+ * [here](http://spec.commonmark.org/0.24/#appendix-a-parsing-strategy).
30
+ *
31
+ * It should be used when "a posteriori" modification of the AST
32
+ * proves to be too difficult / impossible to implement correctly.
33
+ *
34
+ * It can also serve as an intermediary step before extending
35
+ * the specification, as an extension implemented using this API
36
+ * will be trivially integrated in the core if it proves to be
37
+ * desirable.
38
+ */
39
+
40
+ typedef struct cmark_plugin cmark_plugin;
41
+
42
+ /** A syntax extension that can be attached to a cmark_parser
43
+ * with cmark_parser_attach_syntax_extension().
44
+ *
45
+ * Extension writers should assign functions matching
46
+ * the signature of the following 'virtual methods' to
47
+ * implement new functionality.
48
+ *
49
+ * Their calling order and expected behaviour match the procedure outlined
50
+ * at <http://spec.commonmark.org/0.24/#phase-1-block-structure>:
51
+ *
52
+ * During step 1, cmark will call the function provided through
53
+ * 'cmark_syntax_extension_set_match_block_func' when it
54
+ * iterates over an open block created by this extension,
55
+ * to determine whether it could contain the new line.
56
+ * If no function was provided, cmark will close the block.
57
+ *
58
+ * During step 2, if and only if the new line doesn't match any
59
+ * of the standard syntax rules, cmark will call the function
60
+ * provided through 'cmark_syntax_extension_set_open_block_func'
61
+ * to let the extension determine whether that new line matches
62
+ * one of its syntax rules.
63
+ * It is the responsibility of the parser to create and add the
64
+ * new block with cmark_parser_make_block and cmark_parser_add_child.
65
+ * If no function was provided is NULL, the extension will have
66
+ * no effect at all on the final block structure of the AST.
67
+ *
68
+ * #### Inline parsing phase hooks
69
+ *
70
+ * For each character provided by the extension through
71
+ * 'cmark_syntax_extension_set_special_inline_chars',
72
+ * the function provided by the extension through
73
+ * 'cmark_syntax_extension_set_match_inline_func'
74
+ * will get called, it is the responsibility of the extension
75
+ * to scan the characters located at the current inline parsing offset
76
+ * with the cmark_inline_parser API.
77
+ *
78
+ * Depending on the type of the extension, it can either:
79
+ *
80
+ * * Scan forward, determine that the syntax matches and return
81
+ * a newly-created inline node with the appropriate type.
82
+ * This is the technique that would be used if inline code
83
+ * (with backticks) was implemented as an extension.
84
+ * * Scan only the character(s) that its syntax rules require
85
+ * for opening and closing nodes, push a delimiter on the
86
+ * delimiter stack, and return a simple text node with its
87
+ * contents set to the character(s) consumed.
88
+ * This is the technique that would be used if emphasis
89
+ * inlines were implemented as an extension.
90
+ *
91
+ * When an extension has pushed delimiters on the stack,
92
+ * the function provided through
93
+ * 'cmark_syntax_extension_set_inline_from_delim_func'
94
+ * will get called in a latter phase,
95
+ * when the inline parser has matched opener and closer delimiters
96
+ * created by the extension together.
97
+ *
98
+ * It is then the responsibility of the extension to modify
99
+ * and populate the opener inline text node, and to remove
100
+ * the necessary delimiters from the delimiter stack.
101
+ *
102
+ * Finally, the extension should return NULL if its scan didn't
103
+ * match its syntax rules.
104
+ *
105
+ * The extension can store whatever private data it might need
106
+ * with 'cmark_syntax_extension_set_private',
107
+ * and optionally define a free function for this data.
108
+ */
109
+ typedef struct cmark_syntax_extension cmark_syntax_extension;
110
+
111
+ typedef struct subject cmark_inline_parser;
112
+
113
+ /** Exposed raw for now */
114
+
115
+ typedef struct delimiter {
116
+ struct delimiter *previous;
117
+ struct delimiter *next;
118
+ cmark_node *inl_text;
119
+ bufsize_t length;
120
+ unsigned char delim_char;
121
+ int can_open;
122
+ int can_close;
123
+ } delimiter;
124
+
125
+ /**
126
+ * ### Plugin API.
127
+ *
128
+ * Extensions should be distributed as dynamic libraries,
129
+ * with a single exported function named after the distributed
130
+ * filename.
131
+ *
132
+ * When discovering extensions (see cmark_init), cmark will
133
+ * try to load a symbol named "init_{{filename}}" in all the
134
+ * dynamic libraries it encounters.
135
+ *
136
+ * For example, given a dynamic library named myextension.so
137
+ * (or myextension.dll), cmark will try to load the symbol
138
+ * named "init_myextension". This means that the filename
139
+ * must lend itself to forming a valid C identifier, with
140
+ * the notable exception of dashes, which will be translated
141
+ * to underscores, which means cmark will look for a function
142
+ * named "init_my_extension" if it encounters a dynamic library
143
+ * named "my-extension.so".
144
+ *
145
+ * See the 'cmark_plugin_init_func' typedef for the exact prototype
146
+ * this function should follow.
147
+ *
148
+ * For now the extensibility of cmark is not complete, as
149
+ * it only offers API to hook into the block parsing phase
150
+ * (<http://spec.commonmark.org/0.24/#phase-1-block-structure>).
151
+ *
152
+ * See 'cmark_plugin_register_syntax_extension' for more information.
153
+ */
154
+
155
+ /** The prototype plugins' init function should follow.
156
+ */
157
+ typedef int (*cmark_plugin_init_func)(cmark_plugin *plugin);
158
+
159
+ /** Register a syntax 'extension' with the 'plugin', it will be made
160
+ * available as an extension and, if attached to a cmark_parser
161
+ * with 'cmark_parser_attach_syntax_extension', it will contribute
162
+ * to the block parsing process.
163
+ *
164
+ * See the documentation for 'cmark_syntax_extension' for information
165
+ * on how to implement one.
166
+ *
167
+ * This function will typically be called from the init function
168
+ * of external modules.
169
+ *
170
+ * This takes ownership of 'extension', one should not call
171
+ * 'cmark_syntax_extension_free' on a registered extension.
172
+ */
173
+ CMARK_EXPORT
174
+ int cmark_plugin_register_syntax_extension(cmark_plugin *plugin,
175
+ cmark_syntax_extension *extension);
176
+
177
+ /** This will search for the syntax extension named 'name' among the
178
+ * registered syntax extensions.
179
+ *
180
+ * It can then be attached to a cmark_parser
181
+ * with the cmark_parser_attach_syntax_extension method.
182
+ */
183
+ CMARK_EXPORT
184
+ cmark_syntax_extension *cmark_find_syntax_extension(const char *name);
185
+
186
+ /** Should create and add a new open block to 'parent_container' if
187
+ * 'input' matches a syntax rule for that block type. It is allowed
188
+ * to modify the type of 'parent_container'.
189
+ *
190
+ * Should return the newly created block if there is one, or
191
+ * 'parent_container' if its type was modified, or NULL.
192
+ */
193
+ typedef cmark_node * (*cmark_open_block_func) (cmark_syntax_extension *extension,
194
+ int indented,
195
+ cmark_parser *parser,
196
+ cmark_node *parent_container,
197
+ unsigned char *input,
198
+ int len);
199
+
200
+ typedef cmark_node *(*cmark_match_inline_func)(cmark_syntax_extension *extension,
201
+ cmark_parser *parser,
202
+ cmark_node *parent,
203
+ unsigned char character,
204
+ cmark_inline_parser *inline_parser);
205
+
206
+ typedef delimiter *(*cmark_inline_from_delim_func)(cmark_syntax_extension *extension,
207
+ cmark_parser *parser,
208
+ cmark_inline_parser *inline_parser,
209
+ delimiter *opener,
210
+ delimiter *closer);
211
+
212
+ /** Should return 'true' if 'input' can be contained in 'container',
213
+ * 'false' otherwise.
214
+ */
215
+ typedef int (*cmark_match_block_func) (cmark_syntax_extension *extension,
216
+ cmark_parser *parser,
217
+ unsigned char *input,
218
+ int len,
219
+ cmark_node *container);
220
+
221
+ typedef const char *(*cmark_get_type_string_func) (cmark_syntax_extension *extension,
222
+ cmark_node *node);
223
+
224
+ typedef int (*cmark_can_contain_func) (cmark_syntax_extension *extension,
225
+ cmark_node *node,
226
+ cmark_node_type child);
227
+
228
+ typedef int (*cmark_contains_inlines_func) (cmark_syntax_extension *extension,
229
+ cmark_node *node);
230
+
231
+ typedef void (*cmark_common_render_func) (cmark_syntax_extension *extension,
232
+ struct cmark_renderer *renderer,
233
+ cmark_node *node,
234
+ cmark_event_type ev_type,
235
+ int options);
236
+
237
+ typedef int (*cmark_commonmark_escape_func) (cmark_syntax_extension *extension,
238
+ cmark_node *node,
239
+ int c);
240
+
241
+ typedef void (*cmark_html_render_func) (cmark_syntax_extension *extension,
242
+ struct cmark_html_renderer *renderer,
243
+ cmark_node *node,
244
+ cmark_event_type ev_type,
245
+ int options);
246
+
247
+ typedef int (*cmark_html_filter_func) (cmark_syntax_extension *extension,
248
+ const unsigned char *tag,
249
+ size_t tag_len);
250
+
251
+ typedef cmark_node *(*cmark_postprocess_func) (cmark_syntax_extension *extension,
252
+ cmark_parser *parser,
253
+ cmark_node *root);
254
+
255
+ typedef int (*cmark_ispunct_func) (char c);
256
+
257
+ typedef void (*cmark_opaque_free_func) (cmark_syntax_extension *extension,
258
+ cmark_mem *mem,
259
+ cmark_node *node);
260
+
261
+ /** Free a cmark_syntax_extension.
262
+ */
263
+ CMARK_EXPORT
264
+ void cmark_syntax_extension_free (cmark_mem *mem, cmark_syntax_extension *extension);
265
+
266
+ /** Return a newly-constructed cmark_syntax_extension, named 'name'.
267
+ */
268
+ CMARK_EXPORT
269
+ cmark_syntax_extension *cmark_syntax_extension_new (const char *name);
270
+
271
+ CMARK_EXPORT
272
+ cmark_node_type cmark_syntax_extension_add_node(int is_inline);
273
+
274
+ CMARK_EXPORT
275
+ void cmark_syntax_extension_set_emphasis(cmark_syntax_extension *extension, int emphasis);
276
+
277
+ /** See the documentation for 'cmark_syntax_extension'
278
+ */
279
+ CMARK_EXPORT
280
+ void cmark_syntax_extension_set_open_block_func(cmark_syntax_extension *extension,
281
+ cmark_open_block_func func);
282
+
283
+ /** See the documentation for 'cmark_syntax_extension'
284
+ */
285
+ CMARK_EXPORT
286
+ void cmark_syntax_extension_set_match_block_func(cmark_syntax_extension *extension,
287
+ cmark_match_block_func func);
288
+
289
+ /** See the documentation for 'cmark_syntax_extension'
290
+ */
291
+ CMARK_EXPORT
292
+ void cmark_syntax_extension_set_match_inline_func(cmark_syntax_extension *extension,
293
+ cmark_match_inline_func func);
294
+
295
+ /** See the documentation for 'cmark_syntax_extension'
296
+ */
297
+ CMARK_EXPORT
298
+ void cmark_syntax_extension_set_inline_from_delim_func(cmark_syntax_extension *extension,
299
+ cmark_inline_from_delim_func func);
300
+
301
+ /** See the documentation for 'cmark_syntax_extension'
302
+ */
303
+ CMARK_EXPORT
304
+ void cmark_syntax_extension_set_special_inline_chars(cmark_syntax_extension *extension,
305
+ cmark_llist *special_chars);
306
+
307
+ /** See the documentation for 'cmark_syntax_extension'
308
+ */
309
+ CMARK_EXPORT
310
+ void cmark_syntax_extension_set_get_type_string_func(cmark_syntax_extension *extension,
311
+ cmark_get_type_string_func func);
312
+
313
+ /** See the documentation for 'cmark_syntax_extension'
314
+ */
315
+ CMARK_EXPORT
316
+ void cmark_syntax_extension_set_can_contain_func(cmark_syntax_extension *extension,
317
+ cmark_can_contain_func func);
318
+
319
+ /** See the documentation for 'cmark_syntax_extension'
320
+ */
321
+ CMARK_EXPORT
322
+ void cmark_syntax_extension_set_contains_inlines_func(cmark_syntax_extension *extension,
323
+ cmark_contains_inlines_func func);
324
+
325
+ /** See the documentation for 'cmark_syntax_extension'
326
+ */
327
+ CMARK_EXPORT
328
+ void cmark_syntax_extension_set_commonmark_render_func(cmark_syntax_extension *extension,
329
+ cmark_common_render_func func);
330
+
331
+ /** See the documentation for 'cmark_syntax_extension'
332
+ */
333
+ CMARK_EXPORT
334
+ void cmark_syntax_extension_set_plaintext_render_func(cmark_syntax_extension *extension,
335
+ cmark_common_render_func func);
336
+
337
+ /** See the documentation for 'cmark_syntax_extension'
338
+ */
339
+ CMARK_EXPORT
340
+ void cmark_syntax_extension_set_latex_render_func(cmark_syntax_extension *extension,
341
+ cmark_common_render_func func);
342
+
343
+ /** See the documentation for 'cmark_syntax_extension'
344
+ */
345
+ CMARK_EXPORT
346
+ void cmark_syntax_extension_set_man_render_func(cmark_syntax_extension *extension,
347
+ cmark_common_render_func func);
348
+
349
+ /** See the documentation for 'cmark_syntax_extension'
350
+ */
351
+ CMARK_EXPORT
352
+ void cmark_syntax_extension_set_html_render_func(cmark_syntax_extension *extension,
353
+ cmark_html_render_func func);
354
+
355
+ /** See the documentation for 'cmark_syntax_extension'
356
+ */
357
+ CMARK_EXPORT
358
+ void cmark_syntax_extension_set_html_filter_func(cmark_syntax_extension *extension,
359
+ cmark_html_filter_func func);
360
+
361
+ /** See the documentation for 'cmark_syntax_extension'
362
+ */
363
+ CMARK_EXPORT
364
+ void cmark_syntax_extension_set_commonmark_escape_func(cmark_syntax_extension *extension,
365
+ cmark_commonmark_escape_func func);
366
+
367
+ /** See the documentation for 'cmark_syntax_extension'
368
+ */
369
+ CMARK_EXPORT
370
+ void cmark_syntax_extension_set_private(cmark_syntax_extension *extension,
371
+ void *priv,
372
+ cmark_free_func free_func);
373
+
374
+ /** See the documentation for 'cmark_syntax_extension'
375
+ */
376
+ CMARK_EXPORT
377
+ void *cmark_syntax_extension_get_private(cmark_syntax_extension *extension);
378
+
379
+ /** See the documentation for 'cmark_syntax_extension'
380
+ */
381
+ CMARK_EXPORT
382
+ void cmark_syntax_extension_set_postprocess_func(cmark_syntax_extension *extension,
383
+ cmark_postprocess_func func);
384
+
385
+ /** See the documentation for 'cmark_syntax_extension'
386
+ */
387
+ CMARK_EXPORT
388
+ void cmark_syntax_extension_set_opaque_free_func(cmark_syntax_extension *extension,
389
+ cmark_opaque_free_func func);
390
+
391
+ /** See the documentation for 'cmark_syntax_extension'
392
+ */
393
+ CMARK_EXPORT
394
+ void cmark_parser_set_backslash_ispunct_func(cmark_parser *parser,
395
+ cmark_ispunct_func func);
396
+
397
+ /** Return the index of the line currently being parsed, starting with 1.
398
+ */
399
+ CMARK_EXPORT
400
+ int cmark_parser_get_line_number(cmark_parser *parser);
401
+
402
+ /** Return the offset in bytes in the line being processed.
403
+ *
404
+ * Example:
405
+ *
406
+ * ### foo
407
+ *
408
+ * Here, offset will first be 0, then 5 (the index of the 'f' character).
409
+ */
410
+ CMARK_EXPORT
411
+ int cmark_parser_get_offset(cmark_parser *parser);
412
+
413
+ /**
414
+ * Return the offset in 'columns' in the line being processed.
415
+ *
416
+ * This value may differ from the value returned by
417
+ * cmark_parser_get_offset() in that it accounts for tabs,
418
+ * and as such should not be used as an index in the current line's
419
+ * buffer.
420
+ *
421
+ * Example:
422
+ *
423
+ * cmark_parser_advance_offset() can be called to advance the
424
+ * offset by a number of columns, instead of a number of bytes.
425
+ *
426
+ * In that case, if offset falls "in the middle" of a tab
427
+ * character, 'column' and offset will differ.
428
+ *
429
+ * ```
430
+ * foo \t bar
431
+ * ^ ^^
432
+ * offset (0) 20
433
+ * ```
434
+ *
435
+ * If cmark_parser_advance_offset is called here with 'columns'
436
+ * set to 'true' and 'offset' set to 22, cmark_parser_get_offset()
437
+ * will return 20, whereas cmark_parser_get_column() will return
438
+ * 22.
439
+ *
440
+ * Additionally, as tabs expand to the next multiple of 4 column,
441
+ * cmark_parser_has_partially_consumed_tab() will now return
442
+ * 'true'.
443
+ */
444
+ CMARK_EXPORT
445
+ int cmark_parser_get_column(cmark_parser *parser);
446
+
447
+ /** Return the absolute index in bytes of the first nonspace
448
+ * character coming after the offset as returned by
449
+ * cmark_parser_get_offset() in the line currently being processed.
450
+ *
451
+ * Example:
452
+ *
453
+ * ```
454
+ * foo bar baz \n
455
+ * ^ ^ ^
456
+ * 0 offset (16) first_nonspace (28)
457
+ * ```
458
+ */
459
+ CMARK_EXPORT
460
+ int cmark_parser_get_first_nonspace(cmark_parser *parser);
461
+
462
+ /** Return the absolute index of the first nonspace column coming after 'offset'
463
+ * in the line currently being processed, counting tabs as multiple
464
+ * columns as appropriate.
465
+ *
466
+ * See the documentation for cmark_parser_get_first_nonspace() and
467
+ * cmark_parser_get_column() for more information.
468
+ */
469
+ CMARK_EXPORT
470
+ int cmark_parser_get_first_nonspace_column(cmark_parser *parser);
471
+
472
+ /** Return the difference between the values returned by
473
+ * cmark_parser_get_first_nonspace_column() and
474
+ * cmark_parser_get_column().
475
+ *
476
+ * This is not a byte offset, as it can count one tab as multiple
477
+ * characters.
478
+ */
479
+ CMARK_EXPORT
480
+ int cmark_parser_get_indent(cmark_parser *parser);
481
+
482
+ /** Return 'true' if the line currently being processed has been entirely
483
+ * consumed, 'false' otherwise.
484
+ *
485
+ * Example:
486
+ *
487
+ * ```
488
+ * foo bar baz \n
489
+ * ^
490
+ * offset
491
+ * ```
492
+ *
493
+ * This function will return 'false' here.
494
+ *
495
+ * ```
496
+ * foo bar baz \n
497
+ * ^
498
+ * offset
499
+ * ```
500
+ * This function will still return 'false'.
501
+ *
502
+ * ```
503
+ * foo bar baz \n
504
+ * ^
505
+ * offset
506
+ * ```
507
+ *
508
+ * At this point, this function will now return 'true'.
509
+ */
510
+ CMARK_EXPORT
511
+ int cmark_parser_is_blank(cmark_parser *parser);
512
+
513
+ /** Return 'true' if the value returned by cmark_parser_get_offset()
514
+ * is 'inside' an expanded tab.
515
+ *
516
+ * See the documentation for cmark_parser_get_column() for more
517
+ * information.
518
+ */
519
+ CMARK_EXPORT
520
+ int cmark_parser_has_partially_consumed_tab(cmark_parser *parser);
521
+
522
+ /** Return the length in bytes of the previously processed line, excluding potential
523
+ * newline (\n) and carriage return (\r) trailing characters.
524
+ */
525
+ CMARK_EXPORT
526
+ int cmark_parser_get_last_line_length(cmark_parser *parser);
527
+
528
+ /** Add a child to 'parent' during the parsing process.
529
+ *
530
+ * If 'parent' isn't the kind of node that can accept this child,
531
+ * this function will back up till it hits a node that can, closing
532
+ * blocks as appropriate.
533
+ */
534
+ CMARK_EXPORT
535
+ cmark_node*cmark_parser_add_child(cmark_parser *parser,
536
+ cmark_node *parent,
537
+ cmark_node_type block_type,
538
+ int start_column);
539
+
540
+ /** Advance the 'offset' of the parser in the current line.
541
+ *
542
+ * See the documentation of cmark_parser_get_offset() and
543
+ * cmark_parser_get_column() for more information.
544
+ */
545
+ CMARK_EXPORT
546
+ void cmark_parser_advance_offset(cmark_parser *parser,
547
+ const char *input,
548
+ int count,
549
+ int columns);
550
+
551
+
552
+ CMARK_EXPORT
553
+ void cmark_parser_feed_reentrant(cmark_parser *parser, const char *buffer, size_t len);
554
+
555
+ /** Attach the syntax 'extension' to the 'parser', to provide extra syntax
556
+ * rules.
557
+ * See the documentation for cmark_syntax_extension for more information.
558
+ *
559
+ * Returns 'true' if the 'extension' was successfully attached,
560
+ * 'false' otherwise.
561
+ */
562
+ CMARK_EXPORT
563
+ int cmark_parser_attach_syntax_extension(cmark_parser *parser, cmark_syntax_extension *extension);
564
+
565
+ /** Change the type of 'node'.
566
+ *
567
+ * Return 0 if the type could be changed, 1 otherwise.
568
+ */
569
+ CMARK_EXPORT int cmark_node_set_type(cmark_node *node, cmark_node_type type);
570
+
571
+ /** Return the string content for all types of 'node'.
572
+ * The pointer stays valid as long as 'node' isn't freed.
573
+ */
574
+ CMARK_EXPORT const char *cmark_node_get_string_content(cmark_node *node);
575
+
576
+ /** Set the string 'content' for all types of 'node'.
577
+ * Copies 'content'.
578
+ */
579
+ CMARK_EXPORT int cmark_node_set_string_content(cmark_node *node, const char *content);
580
+
581
+ /** Get the syntax extension responsible for the creation of 'node'.
582
+ * Return NULL if 'node' was created because it matched standard syntax rules.
583
+ */
584
+ CMARK_EXPORT cmark_syntax_extension *cmark_node_get_syntax_extension(cmark_node *node);
585
+
586
+ /** Set the syntax extension responsible for creating 'node'.
587
+ */
588
+ CMARK_EXPORT int cmark_node_set_syntax_extension(cmark_node *node,
589
+ cmark_syntax_extension *extension);
590
+
591
+ /**
592
+ * ## Inline syntax extension helpers
593
+ *
594
+ * The inline parsing process is described in detail at
595
+ * <http://spec.commonmark.org/0.24/#phase-2-inline-structure>
596
+ */
597
+
598
+ /** Should return 'true' if the predicate matches 'c', 'false' otherwise
599
+ */
600
+ typedef int (*cmark_inline_predicate)(int c);
601
+
602
+ /** Advance the current inline parsing offset */
603
+ CMARK_EXPORT
604
+ void cmark_inline_parser_advance_offset(cmark_inline_parser *parser);
605
+
606
+ /** Get the current inline parsing offset */
607
+ CMARK_EXPORT
608
+ int cmark_inline_parser_get_offset(cmark_inline_parser *parser);
609
+
610
+ /** Set the offset in bytes in the chunk being processed by the given inline parser.
611
+ */
612
+ CMARK_EXPORT
613
+ void cmark_inline_parser_set_offset(cmark_inline_parser *parser, int offset);
614
+
615
+ /** Gets the cmark_chunk being operated on by the given inline parser.
616
+ * Use cmark_inline_parser_get_offset to get our current position in the chunk.
617
+ */
618
+ CMARK_EXPORT
619
+ struct cmark_chunk *cmark_inline_parser_get_chunk(cmark_inline_parser *parser);
620
+
621
+ /** Returns 1 if the inline parser is currently in a bracket; pass 1 for 'image'
622
+ * if you want to know about an image-type bracket, 0 for link-type. */
623
+ CMARK_EXPORT
624
+ int cmark_inline_parser_in_bracket(cmark_inline_parser *parser, int image);
625
+
626
+ /** Remove the last n characters from the last child of the given node.
627
+ * This only works where all n characters are in the single last child, and the last
628
+ * child is CMARK_NODE_TEXT.
629
+ */
630
+ CMARK_EXPORT
631
+ void cmark_node_unput(cmark_node *node, int n);
632
+
633
+
634
+ /** Get the character located at the current inline parsing offset
635
+ */
636
+ CMARK_EXPORT
637
+ unsigned char cmark_inline_parser_peek_char(cmark_inline_parser *parser);
638
+
639
+ /** Get the character located 'pos' bytes in the current line.
640
+ */
641
+ CMARK_EXPORT
642
+ unsigned char cmark_inline_parser_peek_at(cmark_inline_parser *parser, int pos);
643
+
644
+ /** Whether the inline parser has reached the end of the current line
645
+ */
646
+ CMARK_EXPORT
647
+ int cmark_inline_parser_is_eof(cmark_inline_parser *parser);
648
+
649
+ /** Get the characters located after the current inline parsing offset
650
+ * while 'pred' matches. Free after usage.
651
+ */
652
+ CMARK_EXPORT
653
+ char *cmark_inline_parser_take_while(cmark_inline_parser *parser, cmark_inline_predicate pred);
654
+
655
+ /** Push a delimiter on the delimiter stack.
656
+ * See <<http://spec.commonmark.org/0.24/#phase-2-inline-structure> for
657
+ * more information on the parameters
658
+ */
659
+ CMARK_EXPORT
660
+ void cmark_inline_parser_push_delimiter(cmark_inline_parser *parser,
661
+ unsigned char c,
662
+ int can_open,
663
+ int can_close,
664
+ cmark_node *inl_text);
665
+
666
+ /** Remove 'delim' from the delimiter stack
667
+ */
668
+ CMARK_EXPORT
669
+ void cmark_inline_parser_remove_delimiter(cmark_inline_parser *parser, delimiter *delim);
670
+
671
+ CMARK_EXPORT
672
+ delimiter *cmark_inline_parser_get_last_delimiter(cmark_inline_parser *parser);
673
+
674
+ CMARK_EXPORT
675
+ int cmark_inline_parser_get_line(cmark_inline_parser *parser);
676
+
677
+ CMARK_EXPORT
678
+ int cmark_inline_parser_get_column(cmark_inline_parser *parser);
679
+
680
+ /** Convenience function to scan a given delimiter.
681
+ *
682
+ * 'left_flanking' and 'right_flanking' will be set to true if they
683
+ * respectively precede and follow a non-space, non-punctuation
684
+ * character.
685
+ *
686
+ * Additionally, 'punct_before' and 'punct_after' will respectively be set
687
+ * if the preceding or following character is a punctuation character.
688
+ *
689
+ * Note that 'left_flanking' and 'right_flanking' can both be 'true'.
690
+ *
691
+ * Returns the number of delimiters encountered, in the limit
692
+ * of 'max_delims', and advances the inline parsing offset.
693
+ */
694
+ CMARK_EXPORT
695
+ int cmark_inline_parser_scan_delimiters(cmark_inline_parser *parser,
696
+ int max_delims,
697
+ unsigned char c,
698
+ int *left_flanking,
699
+ int *right_flanking,
700
+ int *punct_before,
701
+ int *punct_after);
702
+
703
+ CMARK_EXPORT
704
+ void cmark_manage_extensions_special_characters(cmark_parser *parser, int add);
705
+
706
+ CMARK_EXPORT
707
+ cmark_llist *cmark_parser_get_syntax_extensions(cmark_parser *parser);
708
+
709
+ CMARK_EXPORT
710
+ void cmark_arena_push(void);
711
+
712
+ CMARK_EXPORT
713
+ int cmark_arena_pop(void);
714
+
715
+ #ifdef __cplusplus
716
+ }
717
+ #endif
718
+
719
+ #endif