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.
- checksums.yaml +4 -4
- data/Rakefile +0 -7
- data/ext/commonmarker/{cmark/src/arena.c → arena.c} +0 -0
- data/ext/commonmarker/{cmark/extensions/autolink.c → autolink.c} +0 -0
- data/ext/commonmarker/{cmark/extensions/autolink.h → autolink.h} +0 -0
- data/ext/commonmarker/{cmark/src/blocks.c → blocks.c} +0 -0
- data/ext/commonmarker/{cmark/src/buffer.c → buffer.c} +0 -0
- data/ext/commonmarker/{cmark/src/buffer.h → buffer.h} +0 -0
- data/ext/commonmarker/{cmark/src/case_fold_switch.inc → case_fold_switch.inc} +0 -0
- data/ext/commonmarker/{cmark/src/chunk.h → chunk.h} +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/CMakeLists.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/COPYING +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/FindAsan.cmake +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/Makefile +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/Makefile.nmake +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/README.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/CMakeLists.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/cplusplus.cpp +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/cplusplus.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/harness.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/harness.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/main.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/appveyor.yml +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-bq-flat.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-bq-nested.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-code.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-fences.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-heading.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-hr.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-html.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-lheading.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-list-flat.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-list-nested.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-ref-flat.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-ref-nested.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-autolink.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-backticks.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-em-flat.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-em-nested.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-em-worst.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-entity.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-escape.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-html.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-links-flat.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-links-nested.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-newlines.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/lorem1.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/rawtabs.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/statistics.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/stats.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/benchmarks.md +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeCache.txt +478 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeCCompiler.cmake +71 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeCXXCompiler.cmake +73 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_C.bin +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_CXX.bin +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeSystem.cmake +15 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdC/CMakeCCompilerId.c +567 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdC/a.out +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdCXX/CMakeCXXCompilerId.cpp +539 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdCXX/a.out +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeError.log +18 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeOutput.log +709 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/Makefile.cmake +157 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/Makefile2 +391 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/TargetDirectories.txt +48 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/cmake.check_cache +1 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.bin +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.c +34 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.cxx +405 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/CTestTestfile.cmake +11 -0
- data/ext/commonmarker/cmark-upstream/build/Makefile +280 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/C.includecache +134 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/CXX.includecache +38 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/DependInfo.cmake +38 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/build.make +169 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/cmake_clean.cmake +12 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/cplusplus.cpp.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/depend.internal +28 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/depend.make +28 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/flags.make +17 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/harness.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/link.txt +1 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/main.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/progress.make +5 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/Makefile +302 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/api_test +0 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/cmake_install.cmake +29 -0
- data/ext/commonmarker/cmark-upstream/build/cmake_install.cmake +49 -0
- data/ext/commonmarker/cmark-upstream/build/compile_commands.json +352 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/Export/lib/cmake-gfmextensions/cmark-gfmextensions-release.cmake +30 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/Export/lib/cmake-gfmextensions/cmark-gfmextensions.cmake +108 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/C.includecache +246 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/DependInfo.cmake +36 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/autolink.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/build.make +253 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/cmake_clean.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/core-extensions.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/depend.internal +96 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/depend.make +96 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/ext_scanners.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/flags.make +10 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/link.txt +1 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/progress.make +8 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/strikethrough.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/table.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/tagfilter.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/C.includecache +246 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/DependInfo.cmake +29 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/autolink.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/build.make +249 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/cmake_clean.cmake +15 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/cmake_clean_target.cmake +3 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/core-extensions.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/depend.internal +96 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/depend.make +96 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/ext_scanners.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/flags.make +10 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/link.txt +2 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/progress.make +8 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/strikethrough.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/table.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/tagfilter.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/Makefile +426 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/cmake_install.cmake +84 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/cmarkextensions_export.h +42 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.0.28.3.gfm.11.dylib +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.a +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.dylib +1 -0
- data/ext/commonmarker/cmark-upstream/build/man/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/man/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/man/Makefile +196 -0
- data/ext/commonmarker/cmark-upstream/build/man/cmake_install.cmake +37 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/Export/lib/cmake/cmark-gfm-release.cmake +38 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/Export/lib/cmake/cmark-gfm.cmake +95 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/C.includecache +156 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/DependInfo.cmake +30 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/build.make +115 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/cmake_clean.cmake +10 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/depend.internal +20 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/depend.make +20 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/flags.make +10 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/link.txt +1 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/main.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/progress.make +3 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/C.includecache +612 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/DependInfo.cmake +60 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/arena.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/blocks.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/buffer.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/build.make +819 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmake_clean.cmake +37 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmark.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmark_ctype.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/commonmark.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/depend.internal +319 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/depend.make +319 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/flags.make +10 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/footnotes.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_href_e.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_html_e.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_html_u.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/html.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/inlines.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/iterator.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/latex.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/link.txt +1 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/linked_list.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/man.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/map.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/node.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/plaintext.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/plugin.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/progress.make +29 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/references.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/registry.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/render.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/scanners.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/syntax_extension.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/utf8.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/xml.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/C.includecache +612 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/DependInfo.cmake +54 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/arena.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/blocks.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/buffer.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/build.make +816 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmake_clean.cmake +36 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmake_clean_target.cmake +3 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmark.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmark_ctype.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/commonmark.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/depend.internal +319 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/depend.make +319 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/flags.make +10 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/footnotes.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_href_e.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_html_e.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_html_u.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/html.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/inlines.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/iterator.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/latex.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/link.txt +2 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/linked_list.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/man.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/map.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/node.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/plaintext.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/plugin.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/progress.make +29 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/references.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/registry.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/render.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/scanners.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/syntax_extension.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/utf8.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/xml.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/src/Makefile +1165 -0
- data/ext/commonmarker/cmark-upstream/build/src/cmake_install.cmake +97 -0
- data/ext/commonmarker/cmark-upstream/build/src/cmark-gfm +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/cmark_export.h +42 -0
- data/ext/commonmarker/cmark-upstream/build/src/cmark_version.h +8 -0
- data/ext/commonmarker/cmark-upstream/build/src/config.h +76 -0
- data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.0.28.3.gfm.11.dylib +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.a +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.dylib +1 -0
- data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.pc +10 -0
- data/ext/commonmarker/cmark-upstream/build/testdir/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/testdir/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/testdir/CTestTestfile.cmake +17 -0
- data/ext/commonmarker/cmark-upstream/build/testdir/Makefile +196 -0
- data/ext/commonmarker/cmark-upstream/build/testdir/cmake_install.cmake +29 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/changelog.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/data/CaseFolding.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/CMakeLists.txt +0 -0
- data/ext/commonmarker/cmark-upstream/extensions/autolink.c +421 -0
- data/ext/commonmarker/cmark-upstream/extensions/autolink.h +8 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/core-extensions.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/core-extensions.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/ext_scanners.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/ext_scanners.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/ext_scanners.re +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/strikethrough.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/strikethrough.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/table.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/table.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/tagfilter.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/tagfilter.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/man/CMakeLists.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/man/make_man_page.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/man/man1/cmark-gfm.1 +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/man/man3/cmark-gfm.3 +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/nmake.bat +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/CMakeLists.txt +0 -0
- data/ext/commonmarker/cmark-upstream/src/arena.c +103 -0
- data/ext/commonmarker/cmark-upstream/src/blocks.c +1519 -0
- data/ext/commonmarker/cmark-upstream/src/buffer.c +279 -0
- data/ext/commonmarker/cmark-upstream/src/buffer.h +116 -0
- data/ext/commonmarker/cmark-upstream/src/case_fold_switch.inc +4327 -0
- data/ext/commonmarker/cmark-upstream/src/chunk.h +136 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_ctype.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_ctype.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_extension_api.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_version.h.in +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/commonmark.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/config.h.in +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/entities.inc +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/footnotes.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/footnotes.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini_href_e.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini_html_e.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini_html_u.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/html.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/html.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/inlines.c +8 -4
- data/ext/commonmarker/{cmark → cmark-upstream}/src/inlines.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/iterator.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/iterator.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/latex.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/libcmark-gfm.pc.in +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/linked_list.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/main.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/man.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/map.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/map.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/node.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/node.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/parser.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/plaintext.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/plugin.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/plugin.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/references.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/references.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/registry.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/registry.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/render.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/render.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/scanners.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/scanners.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/scanners.re +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/syntax_extension.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/syntax_extension.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/utf8.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/utf8.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/xml.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/suppressions +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/CMakeLists.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/afl_test_cases/test.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/cmark-fuzz.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/cmark.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/entity_tests.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/extensions.txt +2 -2
- data/ext/commonmarker/{cmark → cmark-upstream}/test/fuzzing_dictionary +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/normalize.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/pathological_tests.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/regression.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/roundtrip_tests.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/run-cmark-fuzz +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/smart_punct.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/spec.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/spec_tests.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/toolchain-mingw32.cmake +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/tools/Dockerfile +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/tools/appveyor-build.bat +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/tools/make_entities_inc.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/tools/mkcasefold.pl +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/why-cmark-and-not-x.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.js +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.rb +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.rkt +0 -0
- data/ext/commonmarker/cmark.c +55 -0
- data/ext/commonmarker/cmark.h +789 -0
- data/ext/commonmarker/cmark_ctype.c +44 -0
- data/ext/commonmarker/cmark_ctype.h +33 -0
- data/ext/commonmarker/cmark_export.h +42 -0
- data/ext/commonmarker/cmark_extension_api.h +719 -0
- data/ext/commonmarker/cmark_version.h +8 -0
- data/ext/commonmarker/cmarkextensions_export.h +42 -0
- data/ext/commonmarker/commonmark.c +508 -0
- data/ext/commonmarker/config.h +76 -0
- data/ext/commonmarker/core-extensions.c +25 -0
- data/ext/commonmarker/core-extensions.h +25 -0
- data/ext/commonmarker/entities.inc +2138 -0
- data/ext/commonmarker/ext_scanners.c +941 -0
- data/ext/commonmarker/ext_scanners.h +22 -0
- data/ext/commonmarker/extconf.rb +1 -48
- data/ext/commonmarker/footnotes.c +40 -0
- data/ext/commonmarker/footnotes.h +25 -0
- data/ext/commonmarker/houdini.h +57 -0
- data/ext/commonmarker/houdini_href_e.c +100 -0
- data/ext/commonmarker/houdini_html_e.c +66 -0
- data/ext/commonmarker/houdini_html_u.c +149 -0
- data/ext/commonmarker/html.c +457 -0
- data/ext/commonmarker/html.h +27 -0
- data/ext/commonmarker/inlines.c +1594 -0
- data/ext/commonmarker/inlines.h +29 -0
- data/ext/commonmarker/iterator.c +159 -0
- data/ext/commonmarker/iterator.h +27 -0
- data/ext/commonmarker/latex.c +466 -0
- data/ext/commonmarker/linked_list.c +37 -0
- data/ext/commonmarker/man.c +278 -0
- data/ext/commonmarker/map.c +122 -0
- data/ext/commonmarker/map.h +42 -0
- data/ext/commonmarker/node.c +965 -0
- data/ext/commonmarker/node.h +116 -0
- data/ext/commonmarker/parser.h +57 -0
- data/ext/commonmarker/plaintext.c +213 -0
- data/ext/commonmarker/plugin.c +36 -0
- data/ext/commonmarker/plugin.h +34 -0
- data/ext/commonmarker/references.c +42 -0
- data/ext/commonmarker/references.h +26 -0
- data/ext/commonmarker/registry.c +63 -0
- data/ext/commonmarker/registry.h +24 -0
- data/ext/commonmarker/render.c +202 -0
- data/ext/commonmarker/render.h +63 -0
- data/ext/commonmarker/scanners.c +18195 -0
- data/ext/commonmarker/scanners.h +64 -0
- data/ext/commonmarker/scanners.re +341 -0
- data/ext/commonmarker/strikethrough.c +157 -0
- data/ext/commonmarker/strikethrough.h +9 -0
- data/ext/commonmarker/syntax_extension.c +139 -0
- data/ext/commonmarker/syntax_extension.h +32 -0
- data/ext/commonmarker/table.c +683 -0
- data/ext/commonmarker/table.h +8 -0
- data/ext/commonmarker/tagfilter.c +60 -0
- data/ext/commonmarker/tagfilter.h +8 -0
- data/ext/commonmarker/utf8.c +317 -0
- data/ext/commonmarker/utf8.h +35 -0
- data/ext/commonmarker/xml.c +174 -0
- data/lib/commonmarker/version.rb +1 -1
- data/test/test_helper.rb +1 -1
- metadata +401 -145
@@ -0,0 +1,116 @@
|
|
1
|
+
#ifndef CMARK_NODE_H
|
2
|
+
#define CMARK_NODE_H
|
3
|
+
|
4
|
+
#ifdef __cplusplus
|
5
|
+
extern "C" {
|
6
|
+
#endif
|
7
|
+
|
8
|
+
#include <stdio.h>
|
9
|
+
#include <stdint.h>
|
10
|
+
|
11
|
+
#include "cmark.h"
|
12
|
+
#include "cmark_extension_api.h"
|
13
|
+
#include "buffer.h"
|
14
|
+
#include "chunk.h"
|
15
|
+
|
16
|
+
typedef struct {
|
17
|
+
cmark_list_type list_type;
|
18
|
+
int marker_offset;
|
19
|
+
int padding;
|
20
|
+
int start;
|
21
|
+
cmark_delim_type delimiter;
|
22
|
+
unsigned char bullet_char;
|
23
|
+
bool tight;
|
24
|
+
} cmark_list;
|
25
|
+
|
26
|
+
typedef struct {
|
27
|
+
cmark_chunk info;
|
28
|
+
cmark_chunk literal;
|
29
|
+
uint8_t fence_length;
|
30
|
+
uint8_t fence_offset;
|
31
|
+
unsigned char fence_char;
|
32
|
+
int8_t fenced;
|
33
|
+
} cmark_code;
|
34
|
+
|
35
|
+
typedef struct {
|
36
|
+
int level;
|
37
|
+
bool setext;
|
38
|
+
} cmark_heading;
|
39
|
+
|
40
|
+
typedef struct {
|
41
|
+
cmark_chunk url;
|
42
|
+
cmark_chunk title;
|
43
|
+
} cmark_link;
|
44
|
+
|
45
|
+
typedef struct {
|
46
|
+
cmark_chunk on_enter;
|
47
|
+
cmark_chunk on_exit;
|
48
|
+
} cmark_custom;
|
49
|
+
|
50
|
+
enum cmark_node__internal_flags {
|
51
|
+
CMARK_NODE__OPEN = (1 << 0),
|
52
|
+
CMARK_NODE__LAST_LINE_BLANK = (1 << 1),
|
53
|
+
};
|
54
|
+
|
55
|
+
struct cmark_node {
|
56
|
+
cmark_strbuf content;
|
57
|
+
|
58
|
+
struct cmark_node *next;
|
59
|
+
struct cmark_node *prev;
|
60
|
+
struct cmark_node *parent;
|
61
|
+
struct cmark_node *first_child;
|
62
|
+
struct cmark_node *last_child;
|
63
|
+
|
64
|
+
void *user_data;
|
65
|
+
cmark_free_func user_data_free_func;
|
66
|
+
|
67
|
+
int start_line;
|
68
|
+
int start_column;
|
69
|
+
int end_line;
|
70
|
+
int end_column;
|
71
|
+
int internal_offset;
|
72
|
+
uint16_t type;
|
73
|
+
uint16_t flags;
|
74
|
+
|
75
|
+
cmark_syntax_extension *extension;
|
76
|
+
|
77
|
+
union {
|
78
|
+
cmark_chunk literal;
|
79
|
+
cmark_list list;
|
80
|
+
cmark_code code;
|
81
|
+
cmark_heading heading;
|
82
|
+
cmark_link link;
|
83
|
+
cmark_custom custom;
|
84
|
+
int html_block_type;
|
85
|
+
void *opaque;
|
86
|
+
} as;
|
87
|
+
};
|
88
|
+
|
89
|
+
static CMARK_INLINE cmark_mem *cmark_node_mem(cmark_node *node) {
|
90
|
+
return node->content.mem;
|
91
|
+
}
|
92
|
+
CMARK_EXPORT int cmark_node_check(cmark_node *node, FILE *out);
|
93
|
+
|
94
|
+
static CMARK_INLINE bool CMARK_NODE_TYPE_BLOCK_P(cmark_node_type node_type) {
|
95
|
+
return (node_type & CMARK_NODE_TYPE_MASK) == CMARK_NODE_TYPE_BLOCK;
|
96
|
+
}
|
97
|
+
|
98
|
+
static CMARK_INLINE bool CMARK_NODE_BLOCK_P(cmark_node *node) {
|
99
|
+
return node != NULL && CMARK_NODE_TYPE_BLOCK_P((cmark_node_type) node->type);
|
100
|
+
}
|
101
|
+
|
102
|
+
static CMARK_INLINE bool CMARK_NODE_TYPE_INLINE_P(cmark_node_type node_type) {
|
103
|
+
return (node_type & CMARK_NODE_TYPE_MASK) == CMARK_NODE_TYPE_INLINE;
|
104
|
+
}
|
105
|
+
|
106
|
+
static CMARK_INLINE bool CMARK_NODE_INLINE_P(cmark_node *node) {
|
107
|
+
return node != NULL && CMARK_NODE_TYPE_INLINE_P((cmark_node_type) node->type);
|
108
|
+
}
|
109
|
+
|
110
|
+
CMARK_EXPORT bool cmark_node_can_contain_type(cmark_node *node, cmark_node_type child_type);
|
111
|
+
|
112
|
+
#ifdef __cplusplus
|
113
|
+
}
|
114
|
+
#endif
|
115
|
+
|
116
|
+
#endif
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#ifndef CMARK_PARSER_H
|
2
|
+
#define CMARK_PARSER_H
|
3
|
+
|
4
|
+
#include <stdio.h>
|
5
|
+
#include "node.h"
|
6
|
+
#include "buffer.h"
|
7
|
+
#include "memory.h"
|
8
|
+
|
9
|
+
#ifdef __cplusplus
|
10
|
+
extern "C" {
|
11
|
+
#endif
|
12
|
+
|
13
|
+
#define MAX_LINK_LABEL_LENGTH 1000
|
14
|
+
|
15
|
+
struct cmark_parser {
|
16
|
+
struct cmark_mem *mem;
|
17
|
+
/* A hashtable of urls in the current document for cross-references */
|
18
|
+
struct cmark_map *refmap;
|
19
|
+
/* The root node of the parser, always a CMARK_NODE_DOCUMENT */
|
20
|
+
struct cmark_node *root;
|
21
|
+
/* The last open block after a line is fully processed */
|
22
|
+
struct cmark_node *current;
|
23
|
+
/* See the documentation for cmark_parser_get_line_number() in cmark.h */
|
24
|
+
int line_number;
|
25
|
+
/* See the documentation for cmark_parser_get_offset() in cmark.h */
|
26
|
+
bufsize_t offset;
|
27
|
+
/* See the documentation for cmark_parser_get_column() in cmark.h */
|
28
|
+
bufsize_t column;
|
29
|
+
/* See the documentation for cmark_parser_get_first_nonspace() in cmark.h */
|
30
|
+
bufsize_t first_nonspace;
|
31
|
+
/* See the documentation for cmark_parser_get_first_nonspace_column() in cmark.h */
|
32
|
+
bufsize_t first_nonspace_column;
|
33
|
+
/* See the documentation for cmark_parser_get_indent() in cmark.h */
|
34
|
+
int indent;
|
35
|
+
/* See the documentation for cmark_parser_is_blank() in cmark.h */
|
36
|
+
bool blank;
|
37
|
+
/* See the documentation for cmark_parser_has_partially_consumed_tab() in cmark.h */
|
38
|
+
bool partially_consumed_tab;
|
39
|
+
/* Contains the currently processed line */
|
40
|
+
cmark_strbuf curline;
|
41
|
+
/* See the documentation for cmark_parser_get_last_line_length() in cmark.h */
|
42
|
+
bufsize_t last_line_length;
|
43
|
+
/* FIXME: not sure about the difference with curline */
|
44
|
+
cmark_strbuf linebuf;
|
45
|
+
/* Options set by the user, see the Options section in cmark.h */
|
46
|
+
int options;
|
47
|
+
bool last_buffer_ended_with_cr;
|
48
|
+
cmark_llist *syntax_extensions;
|
49
|
+
cmark_llist *inline_syntax_extensions;
|
50
|
+
cmark_ispunct_func backslash_ispunct;
|
51
|
+
};
|
52
|
+
|
53
|
+
#ifdef __cplusplus
|
54
|
+
}
|
55
|
+
#endif
|
56
|
+
|
57
|
+
#endif
|
@@ -0,0 +1,213 @@
|
|
1
|
+
#include "node.h"
|
2
|
+
#include "syntax_extension.h"
|
3
|
+
#include "render.h"
|
4
|
+
|
5
|
+
#define OUT(s, wrap, escaping) renderer->out(renderer, node, s, wrap, escaping)
|
6
|
+
#define LIT(s) renderer->out(renderer, node, s, false, LITERAL)
|
7
|
+
#define CR() renderer->cr(renderer)
|
8
|
+
#define BLANKLINE() renderer->blankline(renderer)
|
9
|
+
#define LISTMARKER_SIZE 20
|
10
|
+
|
11
|
+
// Functions to convert cmark_nodes to plain text strings.
|
12
|
+
|
13
|
+
static CMARK_INLINE void outc(cmark_renderer *renderer, cmark_node *node,
|
14
|
+
cmark_escaping escape,
|
15
|
+
int32_t c, unsigned char nextc) {
|
16
|
+
cmark_render_code_point(renderer, c);
|
17
|
+
}
|
18
|
+
|
19
|
+
// if node is a block node, returns node.
|
20
|
+
// otherwise returns first block-level node that is an ancestor of node.
|
21
|
+
// if there is no block-level ancestor, returns NULL.
|
22
|
+
static cmark_node *get_containing_block(cmark_node *node) {
|
23
|
+
while (node) {
|
24
|
+
if (CMARK_NODE_BLOCK_P(node)) {
|
25
|
+
return node;
|
26
|
+
} else {
|
27
|
+
node = node->parent;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
return NULL;
|
31
|
+
}
|
32
|
+
|
33
|
+
static int S_render_node(cmark_renderer *renderer, cmark_node *node,
|
34
|
+
cmark_event_type ev_type, int options) {
|
35
|
+
cmark_node *tmp;
|
36
|
+
int list_number;
|
37
|
+
cmark_delim_type list_delim;
|
38
|
+
int i;
|
39
|
+
bool entering = (ev_type == CMARK_EVENT_ENTER);
|
40
|
+
char listmarker[LISTMARKER_SIZE];
|
41
|
+
bool first_in_list_item;
|
42
|
+
bufsize_t marker_width;
|
43
|
+
bool allow_wrap = renderer->width > 0 && !(CMARK_OPT_NOBREAKS & options) &&
|
44
|
+
!(CMARK_OPT_HARDBREAKS & options);
|
45
|
+
|
46
|
+
// Don't adjust tight list status til we've started the list.
|
47
|
+
// Otherwise we loose the blank line between a paragraph and
|
48
|
+
// a following list.
|
49
|
+
if (!(node->type == CMARK_NODE_ITEM && node->prev == NULL && entering)) {
|
50
|
+
tmp = get_containing_block(node);
|
51
|
+
renderer->in_tight_list_item =
|
52
|
+
tmp && // tmp might be NULL if there is no containing block
|
53
|
+
((tmp->type == CMARK_NODE_ITEM &&
|
54
|
+
cmark_node_get_list_tight(tmp->parent)) ||
|
55
|
+
(tmp && tmp->parent && tmp->parent->type == CMARK_NODE_ITEM &&
|
56
|
+
cmark_node_get_list_tight(tmp->parent->parent)));
|
57
|
+
}
|
58
|
+
|
59
|
+
if (node->extension && node->extension->plaintext_render_func) {
|
60
|
+
node->extension->plaintext_render_func(node->extension, renderer, node, ev_type, options);
|
61
|
+
return 1;
|
62
|
+
}
|
63
|
+
|
64
|
+
switch (node->type) {
|
65
|
+
case CMARK_NODE_DOCUMENT:
|
66
|
+
break;
|
67
|
+
|
68
|
+
case CMARK_NODE_BLOCK_QUOTE:
|
69
|
+
break;
|
70
|
+
|
71
|
+
case CMARK_NODE_LIST:
|
72
|
+
if (!entering && node->next && (node->next->type == CMARK_NODE_CODE_BLOCK ||
|
73
|
+
node->next->type == CMARK_NODE_LIST)) {
|
74
|
+
CR();
|
75
|
+
}
|
76
|
+
break;
|
77
|
+
|
78
|
+
case CMARK_NODE_ITEM:
|
79
|
+
if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) {
|
80
|
+
marker_width = 4;
|
81
|
+
} else {
|
82
|
+
list_number = cmark_node_get_list_start(node->parent);
|
83
|
+
list_delim = cmark_node_get_list_delim(node->parent);
|
84
|
+
tmp = node;
|
85
|
+
while (tmp->prev) {
|
86
|
+
tmp = tmp->prev;
|
87
|
+
list_number += 1;
|
88
|
+
}
|
89
|
+
// we ensure a width of at least 4 so
|
90
|
+
// we get nice transition from single digits
|
91
|
+
// to double
|
92
|
+
snprintf(listmarker, LISTMARKER_SIZE, "%d%s%s", list_number,
|
93
|
+
list_delim == CMARK_PAREN_DELIM ? ")" : ".",
|
94
|
+
list_number < 10 ? " " : " ");
|
95
|
+
marker_width = (bufsize_t)strlen(listmarker);
|
96
|
+
}
|
97
|
+
if (entering) {
|
98
|
+
if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) {
|
99
|
+
LIT(" - ");
|
100
|
+
renderer->begin_content = true;
|
101
|
+
} else {
|
102
|
+
LIT(listmarker);
|
103
|
+
renderer->begin_content = true;
|
104
|
+
}
|
105
|
+
for (i = marker_width; i--;) {
|
106
|
+
cmark_strbuf_putc(renderer->prefix, ' ');
|
107
|
+
}
|
108
|
+
} else {
|
109
|
+
cmark_strbuf_truncate(renderer->prefix,
|
110
|
+
renderer->prefix->size - marker_width);
|
111
|
+
CR();
|
112
|
+
}
|
113
|
+
break;
|
114
|
+
|
115
|
+
case CMARK_NODE_HEADING:
|
116
|
+
if (entering) {
|
117
|
+
renderer->begin_content = true;
|
118
|
+
renderer->no_linebreaks = true;
|
119
|
+
} else {
|
120
|
+
renderer->no_linebreaks = false;
|
121
|
+
BLANKLINE();
|
122
|
+
}
|
123
|
+
break;
|
124
|
+
|
125
|
+
case CMARK_NODE_CODE_BLOCK:
|
126
|
+
first_in_list_item = node->prev == NULL && node->parent &&
|
127
|
+
node->parent->type == CMARK_NODE_ITEM;
|
128
|
+
|
129
|
+
if (!first_in_list_item) {
|
130
|
+
BLANKLINE();
|
131
|
+
}
|
132
|
+
OUT(cmark_node_get_literal(node), false, LITERAL);
|
133
|
+
BLANKLINE();
|
134
|
+
break;
|
135
|
+
|
136
|
+
case CMARK_NODE_HTML_BLOCK:
|
137
|
+
break;
|
138
|
+
|
139
|
+
case CMARK_NODE_CUSTOM_BLOCK:
|
140
|
+
break;
|
141
|
+
|
142
|
+
case CMARK_NODE_THEMATIC_BREAK:
|
143
|
+
BLANKLINE();
|
144
|
+
break;
|
145
|
+
|
146
|
+
case CMARK_NODE_PARAGRAPH:
|
147
|
+
if (!entering) {
|
148
|
+
BLANKLINE();
|
149
|
+
}
|
150
|
+
break;
|
151
|
+
|
152
|
+
case CMARK_NODE_TEXT:
|
153
|
+
OUT(cmark_node_get_literal(node), allow_wrap, NORMAL);
|
154
|
+
break;
|
155
|
+
|
156
|
+
case CMARK_NODE_LINEBREAK:
|
157
|
+
CR();
|
158
|
+
break;
|
159
|
+
|
160
|
+
case CMARK_NODE_SOFTBREAK:
|
161
|
+
if (CMARK_OPT_HARDBREAKS & options) {
|
162
|
+
CR();
|
163
|
+
} else if (!renderer->no_linebreaks && renderer->width == 0 &&
|
164
|
+
!(CMARK_OPT_HARDBREAKS & options) &&
|
165
|
+
!(CMARK_OPT_NOBREAKS & options)) {
|
166
|
+
CR();
|
167
|
+
} else {
|
168
|
+
OUT(" ", allow_wrap, LITERAL);
|
169
|
+
}
|
170
|
+
break;
|
171
|
+
|
172
|
+
case CMARK_NODE_CODE:
|
173
|
+
OUT(cmark_node_get_literal(node), allow_wrap, LITERAL);
|
174
|
+
break;
|
175
|
+
|
176
|
+
case CMARK_NODE_HTML_INLINE:
|
177
|
+
break;
|
178
|
+
|
179
|
+
case CMARK_NODE_CUSTOM_INLINE:
|
180
|
+
break;
|
181
|
+
|
182
|
+
case CMARK_NODE_STRONG:
|
183
|
+
break;
|
184
|
+
|
185
|
+
case CMARK_NODE_EMPH:
|
186
|
+
break;
|
187
|
+
|
188
|
+
case CMARK_NODE_LINK:
|
189
|
+
break;
|
190
|
+
|
191
|
+
case CMARK_NODE_IMAGE:
|
192
|
+
break;
|
193
|
+
|
194
|
+
default:
|
195
|
+
assert(false);
|
196
|
+
break;
|
197
|
+
}
|
198
|
+
|
199
|
+
return 1;
|
200
|
+
}
|
201
|
+
|
202
|
+
char *cmark_render_plaintext(cmark_node *root, int options, int width) {
|
203
|
+
return cmark_render_plaintext_with_mem(root, options, width, cmark_node_mem(root));
|
204
|
+
}
|
205
|
+
|
206
|
+
char *cmark_render_plaintext_with_mem(cmark_node *root, int options, int width, cmark_mem *mem) {
|
207
|
+
if (options & CMARK_OPT_HARDBREAKS) {
|
208
|
+
// disable breaking on width, since it has
|
209
|
+
// a different meaning with OPT_HARDBREAKS
|
210
|
+
width = 0;
|
211
|
+
}
|
212
|
+
return cmark_render(mem, root, options, width, outc, S_render_node);
|
213
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#include <stdlib.h>
|
2
|
+
|
3
|
+
#include "plugin.h"
|
4
|
+
|
5
|
+
extern cmark_mem CMARK_DEFAULT_MEM_ALLOCATOR;
|
6
|
+
|
7
|
+
int cmark_plugin_register_syntax_extension(cmark_plugin * plugin,
|
8
|
+
cmark_syntax_extension * extension) {
|
9
|
+
plugin->syntax_extensions = cmark_llist_append(&CMARK_DEFAULT_MEM_ALLOCATOR, plugin->syntax_extensions, extension);
|
10
|
+
return 1;
|
11
|
+
}
|
12
|
+
|
13
|
+
cmark_plugin *
|
14
|
+
cmark_plugin_new(void) {
|
15
|
+
cmark_plugin *res = (cmark_plugin *) CMARK_DEFAULT_MEM_ALLOCATOR.calloc(1, sizeof(cmark_plugin));
|
16
|
+
|
17
|
+
res->syntax_extensions = NULL;
|
18
|
+
|
19
|
+
return res;
|
20
|
+
}
|
21
|
+
|
22
|
+
void
|
23
|
+
cmark_plugin_free(cmark_plugin *plugin) {
|
24
|
+
cmark_llist_free_full(&CMARK_DEFAULT_MEM_ALLOCATOR,
|
25
|
+
plugin->syntax_extensions,
|
26
|
+
(cmark_free_func) cmark_syntax_extension_free);
|
27
|
+
CMARK_DEFAULT_MEM_ALLOCATOR.free(plugin);
|
28
|
+
}
|
29
|
+
|
30
|
+
cmark_llist *
|
31
|
+
cmark_plugin_steal_syntax_extensions(cmark_plugin *plugin) {
|
32
|
+
cmark_llist *res = plugin->syntax_extensions;
|
33
|
+
|
34
|
+
plugin->syntax_extensions = NULL;
|
35
|
+
return res;
|
36
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#ifndef CMARK_PLUGIN_H
|
2
|
+
#define CMARK_PLUGIN_H
|
3
|
+
|
4
|
+
#ifdef __cplusplus
|
5
|
+
extern "C" {
|
6
|
+
#endif
|
7
|
+
|
8
|
+
#include "cmark.h"
|
9
|
+
#include "cmark_extension_api.h"
|
10
|
+
|
11
|
+
/**
|
12
|
+
* cmark_plugin:
|
13
|
+
*
|
14
|
+
* A plugin structure, which should be filled by plugin's
|
15
|
+
* init functions.
|
16
|
+
*/
|
17
|
+
struct cmark_plugin {
|
18
|
+
cmark_llist *syntax_extensions;
|
19
|
+
};
|
20
|
+
|
21
|
+
cmark_llist *
|
22
|
+
cmark_plugin_steal_syntax_extensions(cmark_plugin *plugin);
|
23
|
+
|
24
|
+
cmark_plugin *
|
25
|
+
cmark_plugin_new(void);
|
26
|
+
|
27
|
+
void
|
28
|
+
cmark_plugin_free(cmark_plugin *plugin);
|
29
|
+
|
30
|
+
#ifdef __cplusplus
|
31
|
+
}
|
32
|
+
#endif
|
33
|
+
|
34
|
+
#endif
|