commonmarker 0.17.7 → 0.17.7.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of commonmarker might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/commonmarker.gemspec +1 -1
- data/lib/commonmarker/version.rb +1 -1
- metadata +2 -335
- data/ext/commonmarker/cmark-upstream/CMakeLists.txt +0 -44
- data/ext/commonmarker/cmark-upstream/COPYING +0 -170
- data/ext/commonmarker/cmark-upstream/FindAsan.cmake +0 -74
- data/ext/commonmarker/cmark-upstream/Makefile +0 -226
- data/ext/commonmarker/cmark-upstream/Makefile.nmake +0 -36
- data/ext/commonmarker/cmark-upstream/README.md +0 -206
- data/ext/commonmarker/cmark-upstream/api_test/CMakeLists.txt +0 -26
- data/ext/commonmarker/cmark-upstream/api_test/cplusplus.cpp +0 -15
- data/ext/commonmarker/cmark-upstream/api_test/cplusplus.h +0 -16
- data/ext/commonmarker/cmark-upstream/api_test/harness.c +0 -110
- data/ext/commonmarker/cmark-upstream/api_test/harness.h +0 -35
- data/ext/commonmarker/cmark-upstream/api_test/main.c +0 -1116
- data/ext/commonmarker/cmark-upstream/appveyor.yml +0 -17
- data/ext/commonmarker/cmark-upstream/bench/samples/block-bq-flat.md +0 -16
- data/ext/commonmarker/cmark-upstream/bench/samples/block-bq-nested.md +0 -13
- data/ext/commonmarker/cmark-upstream/bench/samples/block-code.md +0 -11
- data/ext/commonmarker/cmark-upstream/bench/samples/block-fences.md +0 -14
- data/ext/commonmarker/cmark-upstream/bench/samples/block-heading.md +0 -9
- data/ext/commonmarker/cmark-upstream/bench/samples/block-hr.md +0 -10
- data/ext/commonmarker/cmark-upstream/bench/samples/block-html.md +0 -32
- data/ext/commonmarker/cmark-upstream/bench/samples/block-lheading.md +0 -8
- data/ext/commonmarker/cmark-upstream/bench/samples/block-list-flat.md +0 -67
- data/ext/commonmarker/cmark-upstream/bench/samples/block-list-nested.md +0 -36
- data/ext/commonmarker/cmark-upstream/bench/samples/block-ref-flat.md +0 -15
- data/ext/commonmarker/cmark-upstream/bench/samples/block-ref-nested.md +0 -17
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-autolink.md +0 -14
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-backticks.md +0 -3
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-em-flat.md +0 -5
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-em-nested.md +0 -5
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-em-worst.md +0 -5
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-entity.md +0 -11
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-escape.md +0 -15
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-html.md +0 -44
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-links-flat.md +0 -23
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-links-nested.md +0 -13
- data/ext/commonmarker/cmark-upstream/bench/samples/inline-newlines.md +0 -24
- data/ext/commonmarker/cmark-upstream/bench/samples/lorem1.md +0 -13
- data/ext/commonmarker/cmark-upstream/bench/samples/rawtabs.md +0 -18
- data/ext/commonmarker/cmark-upstream/bench/statistics.py +0 -595
- data/ext/commonmarker/cmark-upstream/bench/stats.py +0 -19
- data/ext/commonmarker/cmark-upstream/benchmarks.md +0 -33
- data/ext/commonmarker/cmark-upstream/build/CMakeCache.txt +0 -478
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeCCompiler.cmake +0 -71
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeCXXCompiler.cmake +0 -73
- 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 +0 -15
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdC/CMakeCCompilerId.c +0 -567
- 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 +0 -539
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdCXX/a.out +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeError.log +0 -18
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeOutput.log +0 -709
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/Makefile.cmake +0 -157
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/Makefile2 +0 -391
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/TargetDirectories.txt +0 -48
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/cmake.check_cache +0 -1
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.bin +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.c +0 -34
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.cxx +0 -405
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/progress.marks +0 -1
- data/ext/commonmarker/cmark-upstream/build/CTestTestfile.cmake +0 -11
- data/ext/commonmarker/cmark-upstream/build/Makefile +0 -280
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/C.includecache +0 -134
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/CXX.includecache +0 -38
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/DependInfo.cmake +0 -38
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/build.make +0 -169
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/cmake_clean.cmake +0 -12
- 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 +0 -28
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/depend.make +0 -28
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/flags.make +0 -17
- 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 +0 -1
- 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 +0 -5
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/progress.marks +0 -1
- data/ext/commonmarker/cmark-upstream/build/api_test/Makefile +0 -302
- data/ext/commonmarker/cmark-upstream/build/api_test/api_test +0 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/cmake_install.cmake +0 -29
- data/ext/commonmarker/cmark-upstream/build/cmake_install.cmake +0 -49
- data/ext/commonmarker/cmark-upstream/build/compile_commands.json +0 -352
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/Export/lib/cmake-gfmextensions/cmark-gfmextensions-release.cmake +0 -30
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/Export/lib/cmake-gfmextensions/cmark-gfmextensions.cmake +0 -108
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/C.includecache +0 -246
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/DependInfo.cmake +0 -36
- 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 +0 -253
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/cmake_clean.cmake +0 -16
- 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 +0 -96
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/depend.make +0 -96
- 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 +0 -10
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/link.txt +0 -1
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/progress.make +0 -8
- 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 +0 -246
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/DependInfo.cmake +0 -29
- 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 +0 -249
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/cmake_clean.cmake +0 -15
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/cmake_clean_target.cmake +0 -3
- 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 +0 -96
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/depend.make +0 -96
- 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 +0 -10
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/link.txt +0 -2
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/progress.make +0 -8
- 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 +0 -1
- data/ext/commonmarker/cmark-upstream/build/extensions/Makefile +0 -426
- data/ext/commonmarker/cmark-upstream/build/extensions/cmake_install.cmake +0 -84
- data/ext/commonmarker/cmark-upstream/build/extensions/cmarkextensions_export.h +0 -42
- 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 +0 -1
- data/ext/commonmarker/cmark-upstream/build/man/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
- data/ext/commonmarker/cmark-upstream/build/man/CMakeFiles/progress.marks +0 -1
- data/ext/commonmarker/cmark-upstream/build/man/Makefile +0 -196
- data/ext/commonmarker/cmark-upstream/build/man/cmake_install.cmake +0 -37
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/Export/lib/cmake/cmark-gfm-release.cmake +0 -38
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/Export/lib/cmake/cmark-gfm.cmake +0 -95
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/C.includecache +0 -156
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/DependInfo.cmake +0 -30
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/build.make +0 -115
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/cmake_clean.cmake +0 -10
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/depend.internal +0 -20
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/depend.make +0 -20
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/flags.make +0 -10
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/link.txt +0 -1
- 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 +0 -3
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/C.includecache +0 -612
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/DependInfo.cmake +0 -60
- 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 +0 -819
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmake_clean.cmake +0 -37
- 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 +0 -319
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/depend.make +0 -319
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/flags.make +0 -10
- 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 +0 -1
- 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 +0 -29
- 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 +0 -612
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/DependInfo.cmake +0 -54
- 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 +0 -816
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmake_clean.cmake +0 -36
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmake_clean_target.cmake +0 -3
- 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 +0 -319
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/depend.make +0 -319
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/flags.make +0 -10
- 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 +0 -2
- 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 +0 -29
- 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 +0 -1
- data/ext/commonmarker/cmark-upstream/build/src/Makefile +0 -1165
- data/ext/commonmarker/cmark-upstream/build/src/cmake_install.cmake +0 -97
- data/ext/commonmarker/cmark-upstream/build/src/cmark-gfm +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/cmark_export.h +0 -42
- data/ext/commonmarker/cmark-upstream/build/src/cmark_version.h +0 -8
- data/ext/commonmarker/cmark-upstream/build/src/config.h +0 -76
- 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 +0 -1
- data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.pc +0 -10
- data/ext/commonmarker/cmark-upstream/build/testdir/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
- data/ext/commonmarker/cmark-upstream/build/testdir/CMakeFiles/progress.marks +0 -1
- data/ext/commonmarker/cmark-upstream/build/testdir/CTestTestfile.cmake +0 -17
- data/ext/commonmarker/cmark-upstream/build/testdir/Makefile +0 -196
- data/ext/commonmarker/cmark-upstream/build/testdir/cmake_install.cmake +0 -29
- data/ext/commonmarker/cmark-upstream/changelog.txt +0 -964
- data/ext/commonmarker/cmark-upstream/data/CaseFolding.txt +0 -1495
- data/ext/commonmarker/cmark-upstream/extensions/CMakeLists.txt +0 -124
- data/ext/commonmarker/cmark-upstream/extensions/autolink.c +0 -421
- data/ext/commonmarker/cmark-upstream/extensions/autolink.h +0 -8
- data/ext/commonmarker/cmark-upstream/extensions/core-extensions.c +0 -25
- data/ext/commonmarker/cmark-upstream/extensions/core-extensions.h +0 -25
- data/ext/commonmarker/cmark-upstream/extensions/ext_scanners.c +0 -941
- data/ext/commonmarker/cmark-upstream/extensions/ext_scanners.h +0 -22
- data/ext/commonmarker/cmark-upstream/extensions/ext_scanners.re +0 -74
- data/ext/commonmarker/cmark-upstream/extensions/strikethrough.c +0 -157
- data/ext/commonmarker/cmark-upstream/extensions/strikethrough.h +0 -9
- data/ext/commonmarker/cmark-upstream/extensions/table.c +0 -683
- data/ext/commonmarker/cmark-upstream/extensions/table.h +0 -8
- data/ext/commonmarker/cmark-upstream/extensions/tagfilter.c +0 -60
- data/ext/commonmarker/cmark-upstream/extensions/tagfilter.h +0 -8
- data/ext/commonmarker/cmark-upstream/man/CMakeLists.txt +0 -10
- data/ext/commonmarker/cmark-upstream/man/make_man_page.py +0 -133
- data/ext/commonmarker/cmark-upstream/man/man1/cmark-gfm.1 +0 -78
- data/ext/commonmarker/cmark-upstream/man/man3/cmark-gfm.3 +0 -989
- data/ext/commonmarker/cmark-upstream/nmake.bat +0 -1
- data/ext/commonmarker/cmark-upstream/src/CMakeLists.txt +0 -224
- data/ext/commonmarker/cmark-upstream/src/arena.c +0 -103
- data/ext/commonmarker/cmark-upstream/src/blocks.c +0 -1519
- data/ext/commonmarker/cmark-upstream/src/buffer.c +0 -279
- data/ext/commonmarker/cmark-upstream/src/buffer.h +0 -116
- data/ext/commonmarker/cmark-upstream/src/case_fold_switch.inc +0 -4327
- data/ext/commonmarker/cmark-upstream/src/chunk.h +0 -136
- data/ext/commonmarker/cmark-upstream/src/cmark.c +0 -55
- data/ext/commonmarker/cmark-upstream/src/cmark.h +0 -789
- data/ext/commonmarker/cmark-upstream/src/cmark_ctype.c +0 -44
- data/ext/commonmarker/cmark-upstream/src/cmark_ctype.h +0 -33
- data/ext/commonmarker/cmark-upstream/src/cmark_extension_api.h +0 -719
- data/ext/commonmarker/cmark-upstream/src/cmark_version.h.in +0 -8
- data/ext/commonmarker/cmark-upstream/src/commonmark.c +0 -508
- data/ext/commonmarker/cmark-upstream/src/config.h.in +0 -76
- data/ext/commonmarker/cmark-upstream/src/entities.inc +0 -2138
- data/ext/commonmarker/cmark-upstream/src/footnotes.c +0 -40
- data/ext/commonmarker/cmark-upstream/src/footnotes.h +0 -25
- data/ext/commonmarker/cmark-upstream/src/houdini.h +0 -57
- data/ext/commonmarker/cmark-upstream/src/houdini_href_e.c +0 -100
- data/ext/commonmarker/cmark-upstream/src/houdini_html_e.c +0 -66
- data/ext/commonmarker/cmark-upstream/src/houdini_html_u.c +0 -149
- data/ext/commonmarker/cmark-upstream/src/html.c +0 -457
- data/ext/commonmarker/cmark-upstream/src/html.h +0 -27
- data/ext/commonmarker/cmark-upstream/src/inlines.c +0 -1594
- data/ext/commonmarker/cmark-upstream/src/inlines.h +0 -29
- data/ext/commonmarker/cmark-upstream/src/iterator.c +0 -159
- data/ext/commonmarker/cmark-upstream/src/iterator.h +0 -27
- data/ext/commonmarker/cmark-upstream/src/latex.c +0 -466
- data/ext/commonmarker/cmark-upstream/src/libcmark-gfm.pc.in +0 -10
- data/ext/commonmarker/cmark-upstream/src/linked_list.c +0 -37
- data/ext/commonmarker/cmark-upstream/src/main.c +0 -276
- data/ext/commonmarker/cmark-upstream/src/man.c +0 -278
- data/ext/commonmarker/cmark-upstream/src/map.c +0 -122
- data/ext/commonmarker/cmark-upstream/src/map.h +0 -42
- data/ext/commonmarker/cmark-upstream/src/node.c +0 -965
- data/ext/commonmarker/cmark-upstream/src/node.h +0 -116
- data/ext/commonmarker/cmark-upstream/src/parser.h +0 -57
- data/ext/commonmarker/cmark-upstream/src/plaintext.c +0 -213
- data/ext/commonmarker/cmark-upstream/src/plugin.c +0 -36
- data/ext/commonmarker/cmark-upstream/src/plugin.h +0 -34
- data/ext/commonmarker/cmark-upstream/src/references.c +0 -42
- data/ext/commonmarker/cmark-upstream/src/references.h +0 -26
- data/ext/commonmarker/cmark-upstream/src/registry.c +0 -63
- data/ext/commonmarker/cmark-upstream/src/registry.h +0 -24
- data/ext/commonmarker/cmark-upstream/src/render.c +0 -202
- data/ext/commonmarker/cmark-upstream/src/render.h +0 -63
- data/ext/commonmarker/cmark-upstream/src/scanners.c +0 -18195
- data/ext/commonmarker/cmark-upstream/src/scanners.h +0 -64
- data/ext/commonmarker/cmark-upstream/src/scanners.re +0 -341
- data/ext/commonmarker/cmark-upstream/src/syntax_extension.c +0 -139
- data/ext/commonmarker/cmark-upstream/src/syntax_extension.h +0 -32
- data/ext/commonmarker/cmark-upstream/src/utf8.c +0 -317
- data/ext/commonmarker/cmark-upstream/src/utf8.h +0 -35
- data/ext/commonmarker/cmark-upstream/src/xml.c +0 -174
- data/ext/commonmarker/cmark-upstream/suppressions +0 -10
- data/ext/commonmarker/cmark-upstream/test/CMakeLists.txt +0 -98
- data/ext/commonmarker/cmark-upstream/test/afl_test_cases/test.md +0 -49
- data/ext/commonmarker/cmark-upstream/test/cmark-fuzz.c +0 -28
- data/ext/commonmarker/cmark-upstream/test/cmark.py +0 -103
- data/ext/commonmarker/cmark-upstream/test/entity_tests.py +0 -67
- data/ext/commonmarker/cmark-upstream/test/extensions.txt +0 -674
- data/ext/commonmarker/cmark-upstream/test/fuzzing_dictionary +0 -49
- data/ext/commonmarker/cmark-upstream/test/normalize.py +0 -194
- data/ext/commonmarker/cmark-upstream/test/pathological_tests.py +0 -145
- data/ext/commonmarker/cmark-upstream/test/regression.txt +0 -128
- data/ext/commonmarker/cmark-upstream/test/roundtrip_tests.py +0 -50
- data/ext/commonmarker/cmark-upstream/test/run-cmark-fuzz +0 -4
- data/ext/commonmarker/cmark-upstream/test/smart_punct.txt +0 -177
- data/ext/commonmarker/cmark-upstream/test/spec.txt +0 -9919
- data/ext/commonmarker/cmark-upstream/test/spec_tests.py +0 -152
- data/ext/commonmarker/cmark-upstream/toolchain-mingw32.cmake +0 -17
- data/ext/commonmarker/cmark-upstream/tools/Dockerfile +0 -41
- data/ext/commonmarker/cmark-upstream/tools/appveyor-build.bat +0 -13
- data/ext/commonmarker/cmark-upstream/tools/make_entities_inc.py +0 -32
- data/ext/commonmarker/cmark-upstream/tools/mkcasefold.pl +0 -22
- data/ext/commonmarker/cmark-upstream/why-cmark-and-not-x.md +0 -104
- data/ext/commonmarker/cmark-upstream/wrappers/wrapper.js +0 -6
- data/ext/commonmarker/cmark-upstream/wrappers/wrapper.py +0 -37
- data/ext/commonmarker/cmark-upstream/wrappers/wrapper.rb +0 -15
- data/ext/commonmarker/cmark-upstream/wrappers/wrapper.rkt +0 -190
@@ -1,32 +0,0 @@
|
|
1
|
-
#ifndef CMARK_SYNTAX_EXTENSION_H
|
2
|
-
#define CMARK_SYNTAX_EXTENSION_H
|
3
|
-
|
4
|
-
#include "cmark.h"
|
5
|
-
#include "cmark_extension_api.h"
|
6
|
-
#include "config.h"
|
7
|
-
|
8
|
-
struct cmark_syntax_extension {
|
9
|
-
cmark_match_block_func last_block_matches;
|
10
|
-
cmark_open_block_func try_opening_block;
|
11
|
-
cmark_match_inline_func match_inline;
|
12
|
-
cmark_inline_from_delim_func insert_inline_from_delim;
|
13
|
-
cmark_llist * special_inline_chars;
|
14
|
-
char * name;
|
15
|
-
void * priv;
|
16
|
-
bool emphasis;
|
17
|
-
cmark_free_func free_function;
|
18
|
-
cmark_get_type_string_func get_type_string_func;
|
19
|
-
cmark_can_contain_func can_contain_func;
|
20
|
-
cmark_contains_inlines_func contains_inlines_func;
|
21
|
-
cmark_common_render_func commonmark_render_func;
|
22
|
-
cmark_common_render_func plaintext_render_func;
|
23
|
-
cmark_common_render_func latex_render_func;
|
24
|
-
cmark_common_render_func man_render_func;
|
25
|
-
cmark_html_render_func html_render_func;
|
26
|
-
cmark_html_filter_func html_filter_func;
|
27
|
-
cmark_postprocess_func postprocess_func;
|
28
|
-
cmark_opaque_free_func opaque_free_func;
|
29
|
-
cmark_commonmark_escape_func commonmark_escape_func;
|
30
|
-
};
|
31
|
-
|
32
|
-
#endif
|
@@ -1,317 +0,0 @@
|
|
1
|
-
#include <stdlib.h>
|
2
|
-
#include <stdint.h>
|
3
|
-
#include <assert.h>
|
4
|
-
|
5
|
-
#include "cmark_ctype.h"
|
6
|
-
#include "utf8.h"
|
7
|
-
|
8
|
-
static const int8_t utf8proc_utf8class[256] = {
|
9
|
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
10
|
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
11
|
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
12
|
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
13
|
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
14
|
-
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
15
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
16
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
17
|
-
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
18
|
-
2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
19
|
-
4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0};
|
20
|
-
|
21
|
-
static void encode_unknown(cmark_strbuf *buf) {
|
22
|
-
static const uint8_t repl[] = {239, 191, 189};
|
23
|
-
cmark_strbuf_put(buf, repl, 3);
|
24
|
-
}
|
25
|
-
|
26
|
-
static int utf8proc_charlen(const uint8_t *str, bufsize_t str_len) {
|
27
|
-
int length, i;
|
28
|
-
|
29
|
-
if (!str_len)
|
30
|
-
return 0;
|
31
|
-
|
32
|
-
length = utf8proc_utf8class[str[0]];
|
33
|
-
|
34
|
-
if (!length)
|
35
|
-
return -1;
|
36
|
-
|
37
|
-
if (str_len >= 0 && (bufsize_t)length > str_len)
|
38
|
-
return -str_len;
|
39
|
-
|
40
|
-
for (i = 1; i < length; i++) {
|
41
|
-
if ((str[i] & 0xC0) != 0x80)
|
42
|
-
return -i;
|
43
|
-
}
|
44
|
-
|
45
|
-
return length;
|
46
|
-
}
|
47
|
-
|
48
|
-
// Validate a single UTF-8 character according to RFC 3629.
|
49
|
-
static int utf8proc_valid(const uint8_t *str, bufsize_t str_len) {
|
50
|
-
int length = utf8proc_utf8class[str[0]];
|
51
|
-
|
52
|
-
if (!length)
|
53
|
-
return -1;
|
54
|
-
|
55
|
-
if ((bufsize_t)length > str_len)
|
56
|
-
return -str_len;
|
57
|
-
|
58
|
-
switch (length) {
|
59
|
-
case 2:
|
60
|
-
if ((str[1] & 0xC0) != 0x80)
|
61
|
-
return -1;
|
62
|
-
if (str[0] < 0xC2) {
|
63
|
-
// Overlong
|
64
|
-
return -length;
|
65
|
-
}
|
66
|
-
break;
|
67
|
-
|
68
|
-
case 3:
|
69
|
-
if ((str[1] & 0xC0) != 0x80)
|
70
|
-
return -1;
|
71
|
-
if ((str[2] & 0xC0) != 0x80)
|
72
|
-
return -2;
|
73
|
-
if (str[0] == 0xE0) {
|
74
|
-
if (str[1] < 0xA0) {
|
75
|
-
// Overlong
|
76
|
-
return -length;
|
77
|
-
}
|
78
|
-
} else if (str[0] == 0xED) {
|
79
|
-
if (str[1] >= 0xA0) {
|
80
|
-
// Surrogate
|
81
|
-
return -length;
|
82
|
-
}
|
83
|
-
}
|
84
|
-
break;
|
85
|
-
|
86
|
-
case 4:
|
87
|
-
if ((str[1] & 0xC0) != 0x80)
|
88
|
-
return -1;
|
89
|
-
if ((str[2] & 0xC0) != 0x80)
|
90
|
-
return -2;
|
91
|
-
if ((str[3] & 0xC0) != 0x80)
|
92
|
-
return -3;
|
93
|
-
if (str[0] == 0xF0) {
|
94
|
-
if (str[1] < 0x90) {
|
95
|
-
// Overlong
|
96
|
-
return -length;
|
97
|
-
}
|
98
|
-
} else if (str[0] >= 0xF4) {
|
99
|
-
if (str[0] > 0xF4 || str[1] >= 0x90) {
|
100
|
-
// Above 0x10FFFF
|
101
|
-
return -length;
|
102
|
-
}
|
103
|
-
}
|
104
|
-
break;
|
105
|
-
}
|
106
|
-
|
107
|
-
return length;
|
108
|
-
}
|
109
|
-
|
110
|
-
void cmark_utf8proc_check(cmark_strbuf *ob, const uint8_t *line,
|
111
|
-
bufsize_t size) {
|
112
|
-
bufsize_t i = 0;
|
113
|
-
|
114
|
-
while (i < size) {
|
115
|
-
bufsize_t org = i;
|
116
|
-
int charlen = 0;
|
117
|
-
|
118
|
-
while (i < size) {
|
119
|
-
if (line[i] < 0x80 && line[i] != 0) {
|
120
|
-
i++;
|
121
|
-
} else if (line[i] >= 0x80) {
|
122
|
-
charlen = utf8proc_valid(line + i, size - i);
|
123
|
-
if (charlen < 0) {
|
124
|
-
charlen = -charlen;
|
125
|
-
break;
|
126
|
-
}
|
127
|
-
i += charlen;
|
128
|
-
} else if (line[i] == 0) {
|
129
|
-
// ASCII NUL is technically valid but rejected
|
130
|
-
// for security reasons.
|
131
|
-
charlen = 1;
|
132
|
-
break;
|
133
|
-
}
|
134
|
-
}
|
135
|
-
|
136
|
-
if (i > org) {
|
137
|
-
cmark_strbuf_put(ob, line + org, i - org);
|
138
|
-
}
|
139
|
-
|
140
|
-
if (i >= size) {
|
141
|
-
break;
|
142
|
-
} else {
|
143
|
-
// Invalid UTF-8
|
144
|
-
encode_unknown(ob);
|
145
|
-
i += charlen;
|
146
|
-
}
|
147
|
-
}
|
148
|
-
}
|
149
|
-
|
150
|
-
int cmark_utf8proc_iterate(const uint8_t *str, bufsize_t str_len,
|
151
|
-
int32_t *dst) {
|
152
|
-
int length;
|
153
|
-
int32_t uc = -1;
|
154
|
-
|
155
|
-
*dst = -1;
|
156
|
-
length = utf8proc_charlen(str, str_len);
|
157
|
-
if (length < 0)
|
158
|
-
return -1;
|
159
|
-
|
160
|
-
switch (length) {
|
161
|
-
case 1:
|
162
|
-
uc = str[0];
|
163
|
-
break;
|
164
|
-
case 2:
|
165
|
-
uc = ((str[0] & 0x1F) << 6) + (str[1] & 0x3F);
|
166
|
-
if (uc < 0x80)
|
167
|
-
uc = -1;
|
168
|
-
break;
|
169
|
-
case 3:
|
170
|
-
uc = ((str[0] & 0x0F) << 12) + ((str[1] & 0x3F) << 6) + (str[2] & 0x3F);
|
171
|
-
if (uc < 0x800 || (uc >= 0xD800 && uc < 0xE000))
|
172
|
-
uc = -1;
|
173
|
-
break;
|
174
|
-
case 4:
|
175
|
-
uc = ((str[0] & 0x07) << 18) + ((str[1] & 0x3F) << 12) +
|
176
|
-
((str[2] & 0x3F) << 6) + (str[3] & 0x3F);
|
177
|
-
if (uc < 0x10000 || uc >= 0x110000)
|
178
|
-
uc = -1;
|
179
|
-
break;
|
180
|
-
}
|
181
|
-
|
182
|
-
if (uc < 0)
|
183
|
-
return -1;
|
184
|
-
|
185
|
-
*dst = uc;
|
186
|
-
return length;
|
187
|
-
}
|
188
|
-
|
189
|
-
void cmark_utf8proc_encode_char(int32_t uc, cmark_strbuf *buf) {
|
190
|
-
uint8_t dst[4];
|
191
|
-
bufsize_t len = 0;
|
192
|
-
|
193
|
-
assert(uc >= 0);
|
194
|
-
|
195
|
-
if (uc < 0x80) {
|
196
|
-
dst[0] = (uint8_t)(uc);
|
197
|
-
len = 1;
|
198
|
-
} else if (uc < 0x800) {
|
199
|
-
dst[0] = (uint8_t)(0xC0 + (uc >> 6));
|
200
|
-
dst[1] = 0x80 + (uc & 0x3F);
|
201
|
-
len = 2;
|
202
|
-
} else if (uc == 0xFFFF) {
|
203
|
-
dst[0] = 0xFF;
|
204
|
-
len = 1;
|
205
|
-
} else if (uc == 0xFFFE) {
|
206
|
-
dst[0] = 0xFE;
|
207
|
-
len = 1;
|
208
|
-
} else if (uc < 0x10000) {
|
209
|
-
dst[0] = (uint8_t)(0xE0 + (uc >> 12));
|
210
|
-
dst[1] = 0x80 + ((uc >> 6) & 0x3F);
|
211
|
-
dst[2] = 0x80 + (uc & 0x3F);
|
212
|
-
len = 3;
|
213
|
-
} else if (uc < 0x110000) {
|
214
|
-
dst[0] = (uint8_t)(0xF0 + (uc >> 18));
|
215
|
-
dst[1] = 0x80 + ((uc >> 12) & 0x3F);
|
216
|
-
dst[2] = 0x80 + ((uc >> 6) & 0x3F);
|
217
|
-
dst[3] = 0x80 + (uc & 0x3F);
|
218
|
-
len = 4;
|
219
|
-
} else {
|
220
|
-
encode_unknown(buf);
|
221
|
-
return;
|
222
|
-
}
|
223
|
-
|
224
|
-
cmark_strbuf_put(buf, dst, len);
|
225
|
-
}
|
226
|
-
|
227
|
-
void cmark_utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str,
|
228
|
-
bufsize_t len) {
|
229
|
-
int32_t c;
|
230
|
-
|
231
|
-
#define bufpush(x) cmark_utf8proc_encode_char(x, dest)
|
232
|
-
|
233
|
-
while (len > 0) {
|
234
|
-
bufsize_t char_len = cmark_utf8proc_iterate(str, len, &c);
|
235
|
-
|
236
|
-
if (char_len >= 0) {
|
237
|
-
#include "case_fold_switch.inc"
|
238
|
-
} else {
|
239
|
-
encode_unknown(dest);
|
240
|
-
char_len = -char_len;
|
241
|
-
}
|
242
|
-
|
243
|
-
str += char_len;
|
244
|
-
len -= char_len;
|
245
|
-
}
|
246
|
-
}
|
247
|
-
|
248
|
-
// matches anything in the Zs class, plus LF, CR, TAB, FF.
|
249
|
-
int cmark_utf8proc_is_space(int32_t uc) {
|
250
|
-
return (uc == 9 || uc == 10 || uc == 12 || uc == 13 || uc == 32 ||
|
251
|
-
uc == 160 || uc == 5760 || (uc >= 8192 && uc <= 8202) || uc == 8239 ||
|
252
|
-
uc == 8287 || uc == 12288);
|
253
|
-
}
|
254
|
-
|
255
|
-
// matches anything in the P[cdefios] classes.
|
256
|
-
int cmark_utf8proc_is_punctuation(int32_t uc) {
|
257
|
-
return (
|
258
|
-
(uc < 128 && cmark_ispunct((char)uc)) || uc == 161 || uc == 167 ||
|
259
|
-
uc == 171 || uc == 182 || uc == 183 || uc == 187 || uc == 191 ||
|
260
|
-
uc == 894 || uc == 903 || (uc >= 1370 && uc <= 1375) || uc == 1417 ||
|
261
|
-
uc == 1418 || uc == 1470 || uc == 1472 || uc == 1475 || uc == 1478 ||
|
262
|
-
uc == 1523 || uc == 1524 || uc == 1545 || uc == 1546 || uc == 1548 ||
|
263
|
-
uc == 1549 || uc == 1563 || uc == 1566 || uc == 1567 ||
|
264
|
-
(uc >= 1642 && uc <= 1645) || uc == 1748 || (uc >= 1792 && uc <= 1805) ||
|
265
|
-
(uc >= 2039 && uc <= 2041) || (uc >= 2096 && uc <= 2110) || uc == 2142 ||
|
266
|
-
uc == 2404 || uc == 2405 || uc == 2416 || uc == 2800 || uc == 3572 ||
|
267
|
-
uc == 3663 || uc == 3674 || uc == 3675 || (uc >= 3844 && uc <= 3858) ||
|
268
|
-
uc == 3860 || (uc >= 3898 && uc <= 3901) || uc == 3973 ||
|
269
|
-
(uc >= 4048 && uc <= 4052) || uc == 4057 || uc == 4058 ||
|
270
|
-
(uc >= 4170 && uc <= 4175) || uc == 4347 || (uc >= 4960 && uc <= 4968) ||
|
271
|
-
uc == 5120 || uc == 5741 || uc == 5742 || uc == 5787 || uc == 5788 ||
|
272
|
-
(uc >= 5867 && uc <= 5869) || uc == 5941 || uc == 5942 ||
|
273
|
-
(uc >= 6100 && uc <= 6102) || (uc >= 6104 && uc <= 6106) ||
|
274
|
-
(uc >= 6144 && uc <= 6154) || uc == 6468 || uc == 6469 || uc == 6686 ||
|
275
|
-
uc == 6687 || (uc >= 6816 && uc <= 6822) || (uc >= 6824 && uc <= 6829) ||
|
276
|
-
(uc >= 7002 && uc <= 7008) || (uc >= 7164 && uc <= 7167) ||
|
277
|
-
(uc >= 7227 && uc <= 7231) || uc == 7294 || uc == 7295 ||
|
278
|
-
(uc >= 7360 && uc <= 7367) || uc == 7379 || (uc >= 8208 && uc <= 8231) ||
|
279
|
-
(uc >= 8240 && uc <= 8259) || (uc >= 8261 && uc <= 8273) ||
|
280
|
-
(uc >= 8275 && uc <= 8286) || uc == 8317 || uc == 8318 || uc == 8333 ||
|
281
|
-
uc == 8334 || (uc >= 8968 && uc <= 8971) || uc == 9001 || uc == 9002 ||
|
282
|
-
(uc >= 10088 && uc <= 10101) || uc == 10181 || uc == 10182 ||
|
283
|
-
(uc >= 10214 && uc <= 10223) || (uc >= 10627 && uc <= 10648) ||
|
284
|
-
(uc >= 10712 && uc <= 10715) || uc == 10748 || uc == 10749 ||
|
285
|
-
(uc >= 11513 && uc <= 11516) || uc == 11518 || uc == 11519 ||
|
286
|
-
uc == 11632 || (uc >= 11776 && uc <= 11822) ||
|
287
|
-
(uc >= 11824 && uc <= 11842) || (uc >= 12289 && uc <= 12291) ||
|
288
|
-
(uc >= 12296 && uc <= 12305) || (uc >= 12308 && uc <= 12319) ||
|
289
|
-
uc == 12336 || uc == 12349 || uc == 12448 || uc == 12539 || uc == 42238 ||
|
290
|
-
uc == 42239 || (uc >= 42509 && uc <= 42511) || uc == 42611 ||
|
291
|
-
uc == 42622 || (uc >= 42738 && uc <= 42743) ||
|
292
|
-
(uc >= 43124 && uc <= 43127) || uc == 43214 || uc == 43215 ||
|
293
|
-
(uc >= 43256 && uc <= 43258) || uc == 43310 || uc == 43311 ||
|
294
|
-
uc == 43359 || (uc >= 43457 && uc <= 43469) || uc == 43486 ||
|
295
|
-
uc == 43487 || (uc >= 43612 && uc <= 43615) || uc == 43742 ||
|
296
|
-
uc == 43743 || uc == 43760 || uc == 43761 || uc == 44011 || uc == 64830 ||
|
297
|
-
uc == 64831 || (uc >= 65040 && uc <= 65049) ||
|
298
|
-
(uc >= 65072 && uc <= 65106) || (uc >= 65108 && uc <= 65121) ||
|
299
|
-
uc == 65123 || uc == 65128 || uc == 65130 || uc == 65131 ||
|
300
|
-
(uc >= 65281 && uc <= 65283) || (uc >= 65285 && uc <= 65290) ||
|
301
|
-
(uc >= 65292 && uc <= 65295) || uc == 65306 || uc == 65307 ||
|
302
|
-
uc == 65311 || uc == 65312 || (uc >= 65339 && uc <= 65341) ||
|
303
|
-
uc == 65343 || uc == 65371 || uc == 65373 ||
|
304
|
-
(uc >= 65375 && uc <= 65381) || (uc >= 65792 && uc <= 65794) ||
|
305
|
-
uc == 66463 || uc == 66512 || uc == 66927 || uc == 67671 || uc == 67871 ||
|
306
|
-
uc == 67903 || (uc >= 68176 && uc <= 68184) || uc == 68223 ||
|
307
|
-
(uc >= 68336 && uc <= 68342) || (uc >= 68409 && uc <= 68415) ||
|
308
|
-
(uc >= 68505 && uc <= 68508) || (uc >= 69703 && uc <= 69709) ||
|
309
|
-
uc == 69819 || uc == 69820 || (uc >= 69822 && uc <= 69825) ||
|
310
|
-
(uc >= 69952 && uc <= 69955) || uc == 70004 || uc == 70005 ||
|
311
|
-
(uc >= 70085 && uc <= 70088) || uc == 70093 ||
|
312
|
-
(uc >= 70200 && uc <= 70205) || uc == 70854 ||
|
313
|
-
(uc >= 71105 && uc <= 71113) || (uc >= 71233 && uc <= 71235) ||
|
314
|
-
(uc >= 74864 && uc <= 74868) || uc == 92782 || uc == 92783 ||
|
315
|
-
uc == 92917 || (uc >= 92983 && uc <= 92987) || uc == 92996 ||
|
316
|
-
uc == 113823);
|
317
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
#ifndef CMARK_UTF8_H
|
2
|
-
#define CMARK_UTF8_H
|
3
|
-
|
4
|
-
#include <stdint.h>
|
5
|
-
#include "buffer.h"
|
6
|
-
|
7
|
-
#ifdef __cplusplus
|
8
|
-
extern "C" {
|
9
|
-
#endif
|
10
|
-
|
11
|
-
CMARK_EXPORT
|
12
|
-
void cmark_utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str,
|
13
|
-
bufsize_t len);
|
14
|
-
|
15
|
-
CMARK_EXPORT
|
16
|
-
void cmark_utf8proc_encode_char(int32_t uc, cmark_strbuf *buf);
|
17
|
-
|
18
|
-
CMARK_EXPORT
|
19
|
-
int cmark_utf8proc_iterate(const uint8_t *str, bufsize_t str_len, int32_t *dst);
|
20
|
-
|
21
|
-
CMARK_EXPORT
|
22
|
-
void cmark_utf8proc_check(cmark_strbuf *dest, const uint8_t *line,
|
23
|
-
bufsize_t size);
|
24
|
-
|
25
|
-
CMARK_EXPORT
|
26
|
-
int cmark_utf8proc_is_space(int32_t uc);
|
27
|
-
|
28
|
-
CMARK_EXPORT
|
29
|
-
int cmark_utf8proc_is_punctuation(int32_t uc);
|
30
|
-
|
31
|
-
#ifdef __cplusplus
|
32
|
-
}
|
33
|
-
#endif
|
34
|
-
|
35
|
-
#endif
|
@@ -1,174 +0,0 @@
|
|
1
|
-
#include <stdlib.h>
|
2
|
-
#include <stdio.h>
|
3
|
-
#include <string.h>
|
4
|
-
#include <assert.h>
|
5
|
-
|
6
|
-
#include "config.h"
|
7
|
-
#include "cmark.h"
|
8
|
-
#include "node.h"
|
9
|
-
#include "buffer.h"
|
10
|
-
#include "houdini.h"
|
11
|
-
|
12
|
-
#define BUFFER_SIZE 100
|
13
|
-
|
14
|
-
// Functions to convert cmark_nodes to XML strings.
|
15
|
-
|
16
|
-
static void escape_xml(cmark_strbuf *dest, const unsigned char *source,
|
17
|
-
bufsize_t length) {
|
18
|
-
houdini_escape_html0(dest, source, length, 0);
|
19
|
-
}
|
20
|
-
|
21
|
-
struct render_state {
|
22
|
-
cmark_strbuf *xml;
|
23
|
-
int indent;
|
24
|
-
};
|
25
|
-
|
26
|
-
static CMARK_INLINE void indent(struct render_state *state) {
|
27
|
-
int i;
|
28
|
-
for (i = 0; i < state->indent; i++) {
|
29
|
-
cmark_strbuf_putc(state->xml, ' ');
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
static int S_render_node(cmark_node *node, cmark_event_type ev_type,
|
34
|
-
struct render_state *state, int options) {
|
35
|
-
cmark_strbuf *xml = state->xml;
|
36
|
-
bool literal = false;
|
37
|
-
cmark_delim_type delim;
|
38
|
-
bool entering = (ev_type == CMARK_EVENT_ENTER);
|
39
|
-
char buffer[BUFFER_SIZE];
|
40
|
-
|
41
|
-
if (entering) {
|
42
|
-
indent(state);
|
43
|
-
cmark_strbuf_putc(xml, '<');
|
44
|
-
cmark_strbuf_puts(xml, cmark_node_get_type_string(node));
|
45
|
-
|
46
|
-
if (options & CMARK_OPT_SOURCEPOS && node->start_line != 0) {
|
47
|
-
snprintf(buffer, BUFFER_SIZE, " sourcepos=\"%d:%d-%d:%d\"",
|
48
|
-
node->start_line, node->start_column, node->end_line,
|
49
|
-
node->end_column);
|
50
|
-
cmark_strbuf_puts(xml, buffer);
|
51
|
-
}
|
52
|
-
|
53
|
-
literal = false;
|
54
|
-
|
55
|
-
switch (node->type) {
|
56
|
-
case CMARK_NODE_DOCUMENT:
|
57
|
-
cmark_strbuf_puts(xml, " xmlns=\"http://commonmark.org/xml/1.0\"");
|
58
|
-
break;
|
59
|
-
case CMARK_NODE_TEXT:
|
60
|
-
case CMARK_NODE_CODE:
|
61
|
-
case CMARK_NODE_HTML_BLOCK:
|
62
|
-
case CMARK_NODE_HTML_INLINE:
|
63
|
-
cmark_strbuf_puts(xml, ">");
|
64
|
-
escape_xml(xml, node->as.literal.data, node->as.literal.len);
|
65
|
-
cmark_strbuf_puts(xml, "</");
|
66
|
-
cmark_strbuf_puts(xml, cmark_node_get_type_string(node));
|
67
|
-
literal = true;
|
68
|
-
break;
|
69
|
-
case CMARK_NODE_LIST:
|
70
|
-
switch (cmark_node_get_list_type(node)) {
|
71
|
-
case CMARK_ORDERED_LIST:
|
72
|
-
cmark_strbuf_puts(xml, " type=\"ordered\"");
|
73
|
-
snprintf(buffer, BUFFER_SIZE, " start=\"%d\"",
|
74
|
-
cmark_node_get_list_start(node));
|
75
|
-
cmark_strbuf_puts(xml, buffer);
|
76
|
-
delim = cmark_node_get_list_delim(node);
|
77
|
-
if (delim == CMARK_PAREN_DELIM) {
|
78
|
-
cmark_strbuf_puts(xml, " delim=\"paren\"");
|
79
|
-
} else if (delim == CMARK_PERIOD_DELIM) {
|
80
|
-
cmark_strbuf_puts(xml, " delim=\"period\"");
|
81
|
-
}
|
82
|
-
break;
|
83
|
-
case CMARK_BULLET_LIST:
|
84
|
-
cmark_strbuf_puts(xml, " type=\"bullet\"");
|
85
|
-
break;
|
86
|
-
default:
|
87
|
-
break;
|
88
|
-
}
|
89
|
-
snprintf(buffer, BUFFER_SIZE, " tight=\"%s\"",
|
90
|
-
(cmark_node_get_list_tight(node) ? "true" : "false"));
|
91
|
-
cmark_strbuf_puts(xml, buffer);
|
92
|
-
break;
|
93
|
-
case CMARK_NODE_HEADING:
|
94
|
-
snprintf(buffer, BUFFER_SIZE, " level=\"%d\"", node->as.heading.level);
|
95
|
-
cmark_strbuf_puts(xml, buffer);
|
96
|
-
break;
|
97
|
-
case CMARK_NODE_CODE_BLOCK:
|
98
|
-
if (node->as.code.info.len > 0) {
|
99
|
-
cmark_strbuf_puts(xml, " info=\"");
|
100
|
-
escape_xml(xml, node->as.code.info.data, node->as.code.info.len);
|
101
|
-
cmark_strbuf_putc(xml, '"');
|
102
|
-
}
|
103
|
-
cmark_strbuf_puts(xml, ">");
|
104
|
-
escape_xml(xml, node->as.code.literal.data, node->as.code.literal.len);
|
105
|
-
cmark_strbuf_puts(xml, "</");
|
106
|
-
cmark_strbuf_puts(xml, cmark_node_get_type_string(node));
|
107
|
-
literal = true;
|
108
|
-
break;
|
109
|
-
case CMARK_NODE_CUSTOM_BLOCK:
|
110
|
-
case CMARK_NODE_CUSTOM_INLINE:
|
111
|
-
cmark_strbuf_puts(xml, " on_enter=\"");
|
112
|
-
escape_xml(xml, node->as.custom.on_enter.data,
|
113
|
-
node->as.custom.on_enter.len);
|
114
|
-
cmark_strbuf_putc(xml, '"');
|
115
|
-
cmark_strbuf_puts(xml, " on_exit=\"");
|
116
|
-
escape_xml(xml, node->as.custom.on_exit.data,
|
117
|
-
node->as.custom.on_exit.len);
|
118
|
-
cmark_strbuf_putc(xml, '"');
|
119
|
-
break;
|
120
|
-
case CMARK_NODE_LINK:
|
121
|
-
case CMARK_NODE_IMAGE:
|
122
|
-
cmark_strbuf_puts(xml, " destination=\"");
|
123
|
-
escape_xml(xml, node->as.link.url.data, node->as.link.url.len);
|
124
|
-
cmark_strbuf_putc(xml, '"');
|
125
|
-
cmark_strbuf_puts(xml, " title=\"");
|
126
|
-
escape_xml(xml, node->as.link.title.data, node->as.link.title.len);
|
127
|
-
cmark_strbuf_putc(xml, '"');
|
128
|
-
break;
|
129
|
-
default:
|
130
|
-
break;
|
131
|
-
}
|
132
|
-
if (node->first_child) {
|
133
|
-
state->indent += 2;
|
134
|
-
} else if (!literal) {
|
135
|
-
cmark_strbuf_puts(xml, " /");
|
136
|
-
}
|
137
|
-
cmark_strbuf_puts(xml, ">\n");
|
138
|
-
|
139
|
-
} else if (node->first_child) {
|
140
|
-
state->indent -= 2;
|
141
|
-
indent(state);
|
142
|
-
cmark_strbuf_puts(xml, "</");
|
143
|
-
cmark_strbuf_puts(xml, cmark_node_get_type_string(node));
|
144
|
-
cmark_strbuf_puts(xml, ">\n");
|
145
|
-
}
|
146
|
-
|
147
|
-
return 1;
|
148
|
-
}
|
149
|
-
|
150
|
-
char *cmark_render_xml(cmark_node *root, int options) {
|
151
|
-
return cmark_render_xml_with_mem(root, options, cmark_node_mem(root));
|
152
|
-
}
|
153
|
-
|
154
|
-
char *cmark_render_xml_with_mem(cmark_node *root, int options, cmark_mem *mem) {
|
155
|
-
char *result;
|
156
|
-
cmark_strbuf xml = CMARK_BUF_INIT(mem);
|
157
|
-
cmark_event_type ev_type;
|
158
|
-
cmark_node *cur;
|
159
|
-
struct render_state state = {&xml, 0};
|
160
|
-
|
161
|
-
cmark_iter *iter = cmark_iter_new(root);
|
162
|
-
|
163
|
-
cmark_strbuf_puts(state.xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
|
164
|
-
cmark_strbuf_puts(state.xml,
|
165
|
-
"<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n");
|
166
|
-
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
|
167
|
-
cur = cmark_iter_get_node(iter);
|
168
|
-
S_render_node(cur, ev_type, &state, options);
|
169
|
-
}
|
170
|
-
result = (char *)cmark_strbuf_detach(&xml);
|
171
|
-
|
172
|
-
cmark_iter_free(iter);
|
173
|
-
return result;
|
174
|
-
}
|