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,49 +0,0 @@
|
|
1
|
-
asterisk="*"
|
2
|
-
attr_generic=" a=\"1\""
|
3
|
-
attr_href=" href=\"1\""
|
4
|
-
attr_xml_lang=" xml:lang=\"1\""
|
5
|
-
attr_xmlns=" xmlns=\"1\""
|
6
|
-
backslash="\\"
|
7
|
-
backtick="`"
|
8
|
-
colon=":"
|
9
|
-
dashes="---"
|
10
|
-
double_quote="\""
|
11
|
-
entity_builtin="<"
|
12
|
-
entity_decimal=""
|
13
|
-
entity_external="&a;"
|
14
|
-
entity_hex=""
|
15
|
-
equals="==="
|
16
|
-
exclamation="!"
|
17
|
-
greater_than=">"
|
18
|
-
hash="#"
|
19
|
-
hyphen="-"
|
20
|
-
indent=" "
|
21
|
-
left_bracket="["
|
22
|
-
left_paren="("
|
23
|
-
less_than="<"
|
24
|
-
plus="+"
|
25
|
-
right_bracket="]"
|
26
|
-
right_paren=")"
|
27
|
-
single_quote="'"
|
28
|
-
string_any="ANY"
|
29
|
-
string_brackets="[]"
|
30
|
-
string_cdata="CDATA"
|
31
|
-
string_dashes="--"
|
32
|
-
string_empty_dblquotes="\"\""
|
33
|
-
string_empty_quotes="''"
|
34
|
-
string_idrefs="IDREFS"
|
35
|
-
string_parentheses="()"
|
36
|
-
string_pcdata="#PCDATA"
|
37
|
-
tag_cdata="<![CDATA["
|
38
|
-
tag_close="</a>"
|
39
|
-
tag_doctype="<!DOCTYPE"
|
40
|
-
tag_element="<!ELEMENT"
|
41
|
-
tag_entity="<!ENTITY"
|
42
|
-
tag_notation="<!NOTATION"
|
43
|
-
tag_open="<a>"
|
44
|
-
tag_open_close="<a />"
|
45
|
-
tag_open_exclamation="<!"
|
46
|
-
tag_open_q="<?"
|
47
|
-
tag_sq2_close="]]>"
|
48
|
-
tag_xml_q="<?xml?>"
|
49
|
-
underscore="_"
|
@@ -1,194 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
from html.parser import HTMLParser
|
3
|
-
import urllib
|
4
|
-
|
5
|
-
try:
|
6
|
-
from html.parser import HTMLParseError
|
7
|
-
except ImportError:
|
8
|
-
# HTMLParseError was removed in Python 3.5. It could never be
|
9
|
-
# thrown, so we define a placeholder instead.
|
10
|
-
class HTMLParseError(Exception):
|
11
|
-
pass
|
12
|
-
|
13
|
-
from html.entities import name2codepoint
|
14
|
-
import sys
|
15
|
-
import re
|
16
|
-
import cgi
|
17
|
-
|
18
|
-
# Normalization code, adapted from
|
19
|
-
# https://github.com/karlcow/markdown-testsuite/
|
20
|
-
significant_attrs = ["alt", "href", "src", "title"]
|
21
|
-
whitespace_re = re.compile('\s+')
|
22
|
-
class MyHTMLParser(HTMLParser):
|
23
|
-
def __init__(self):
|
24
|
-
HTMLParser.__init__(self)
|
25
|
-
self.convert_charrefs = False
|
26
|
-
self.last = "starttag"
|
27
|
-
self.in_pre = False
|
28
|
-
self.output = ""
|
29
|
-
self.last_tag = ""
|
30
|
-
def handle_data(self, data):
|
31
|
-
after_tag = self.last == "endtag" or self.last == "starttag"
|
32
|
-
after_block_tag = after_tag and self.is_block_tag(self.last_tag)
|
33
|
-
if after_tag and self.last_tag == "br":
|
34
|
-
data = data.lstrip('\n')
|
35
|
-
if not self.in_pre:
|
36
|
-
data = whitespace_re.sub(' ', data)
|
37
|
-
if after_block_tag and not self.in_pre:
|
38
|
-
if self.last == "starttag":
|
39
|
-
data = data.lstrip()
|
40
|
-
elif self.last == "endtag":
|
41
|
-
data = data.strip()
|
42
|
-
self.output += data
|
43
|
-
self.last = "data"
|
44
|
-
def handle_endtag(self, tag):
|
45
|
-
if tag == "pre":
|
46
|
-
self.in_pre = False
|
47
|
-
elif self.is_block_tag(tag):
|
48
|
-
self.output = self.output.rstrip()
|
49
|
-
self.output += "</" + tag + ">"
|
50
|
-
self.last_tag = tag
|
51
|
-
self.last = "endtag"
|
52
|
-
def handle_starttag(self, tag, attrs):
|
53
|
-
if tag == "pre":
|
54
|
-
self.in_pre = True
|
55
|
-
if self.is_block_tag(tag):
|
56
|
-
self.output = self.output.rstrip()
|
57
|
-
self.output += "<" + tag
|
58
|
-
# For now we don't strip out 'extra' attributes, because of
|
59
|
-
# raw HTML test cases.
|
60
|
-
# attrs = filter(lambda attr: attr[0] in significant_attrs, attrs)
|
61
|
-
if attrs:
|
62
|
-
attrs.sort()
|
63
|
-
for (k,v) in attrs:
|
64
|
-
self.output += " " + k
|
65
|
-
if v in ['href','src']:
|
66
|
-
self.output += ("=" + '"' +
|
67
|
-
urllib.quote(urllib.unquote(v), safe='/') + '"')
|
68
|
-
elif v != None:
|
69
|
-
self.output += ("=" + '"' + cgi.escape(v,quote=True) + '"')
|
70
|
-
self.output += ">"
|
71
|
-
self.last_tag = tag
|
72
|
-
self.last = "starttag"
|
73
|
-
def handle_startendtag(self, tag, attrs):
|
74
|
-
"""Ignore closing tag for self-closing """
|
75
|
-
self.handle_starttag(tag, attrs)
|
76
|
-
self.last_tag = tag
|
77
|
-
self.last = "endtag"
|
78
|
-
def handle_comment(self, data):
|
79
|
-
self.output += '<!--' + data + '-->'
|
80
|
-
self.last = "comment"
|
81
|
-
def handle_decl(self, data):
|
82
|
-
self.output += '<!' + data + '>'
|
83
|
-
self.last = "decl"
|
84
|
-
def unknown_decl(self, data):
|
85
|
-
self.output += '<!' + data + '>'
|
86
|
-
self.last = "decl"
|
87
|
-
def handle_pi(self,data):
|
88
|
-
self.output += '<?' + data + '>'
|
89
|
-
self.last = "pi"
|
90
|
-
def handle_entityref(self, name):
|
91
|
-
try:
|
92
|
-
c = chr(name2codepoint[name])
|
93
|
-
except KeyError:
|
94
|
-
c = None
|
95
|
-
self.output_char(c, '&' + name + ';')
|
96
|
-
self.last = "ref"
|
97
|
-
def handle_charref(self, name):
|
98
|
-
try:
|
99
|
-
if name.startswith("x"):
|
100
|
-
c = chr(int(name[1:], 16))
|
101
|
-
else:
|
102
|
-
c = chr(int(name))
|
103
|
-
except ValueError:
|
104
|
-
c = None
|
105
|
-
self.output_char(c, '&' + name + ';')
|
106
|
-
self.last = "ref"
|
107
|
-
# Helpers.
|
108
|
-
def output_char(self, c, fallback):
|
109
|
-
if c == '<':
|
110
|
-
self.output += "<"
|
111
|
-
elif c == '>':
|
112
|
-
self.output += ">"
|
113
|
-
elif c == '&':
|
114
|
-
self.output += "&"
|
115
|
-
elif c == '"':
|
116
|
-
self.output += """
|
117
|
-
elif c == None:
|
118
|
-
self.output += fallback
|
119
|
-
else:
|
120
|
-
self.output += c
|
121
|
-
|
122
|
-
def is_block_tag(self,tag):
|
123
|
-
return (tag in ['article', 'header', 'aside', 'hgroup', 'blockquote',
|
124
|
-
'hr', 'iframe', 'body', 'li', 'map', 'button', 'object', 'canvas',
|
125
|
-
'ol', 'caption', 'output', 'col', 'p', 'colgroup', 'pre', 'dd',
|
126
|
-
'progress', 'div', 'section', 'dl', 'table', 'td', 'dt',
|
127
|
-
'tbody', 'embed', 'textarea', 'fieldset', 'tfoot', 'figcaption',
|
128
|
-
'th', 'figure', 'thead', 'footer', 'tr', 'form', 'ul',
|
129
|
-
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'video', 'script', 'style'])
|
130
|
-
|
131
|
-
def normalize_html(html):
|
132
|
-
r"""
|
133
|
-
Return normalized form of HTML which ignores insignificant output
|
134
|
-
differences:
|
135
|
-
|
136
|
-
Multiple inner whitespaces are collapsed to a single space (except
|
137
|
-
in pre tags):
|
138
|
-
|
139
|
-
>>> normalize_html("<p>a \t b</p>")
|
140
|
-
'<p>a b</p>'
|
141
|
-
|
142
|
-
>>> normalize_html("<p>a \t\nb</p>")
|
143
|
-
'<p>a b</p>'
|
144
|
-
|
145
|
-
* Whitespace surrounding block-level tags is removed.
|
146
|
-
|
147
|
-
>>> normalize_html("<p>a b</p>")
|
148
|
-
'<p>a b</p>'
|
149
|
-
|
150
|
-
>>> normalize_html(" <p>a b</p>")
|
151
|
-
'<p>a b</p>'
|
152
|
-
|
153
|
-
>>> normalize_html("<p>a b</p> ")
|
154
|
-
'<p>a b</p>'
|
155
|
-
|
156
|
-
>>> normalize_html("\n\t<p>\n\t\ta b\t\t</p>\n\t")
|
157
|
-
'<p>a b</p>'
|
158
|
-
|
159
|
-
>>> normalize_html("<i>a b</i> ")
|
160
|
-
'<i>a b</i> '
|
161
|
-
|
162
|
-
* Self-closing tags are converted to open tags.
|
163
|
-
|
164
|
-
>>> normalize_html("<br />")
|
165
|
-
'<br>'
|
166
|
-
|
167
|
-
* Attributes are sorted and lowercased.
|
168
|
-
|
169
|
-
>>> normalize_html('<a title="bar" HREF="foo">x</a>')
|
170
|
-
'<a href="foo" title="bar">x</a>'
|
171
|
-
|
172
|
-
* References are converted to unicode, except that '<', '>', '&', and
|
173
|
-
'"' are rendered using entities.
|
174
|
-
|
175
|
-
>>> normalize_html("∀&><"")
|
176
|
-
'\u2200&><"'
|
177
|
-
|
178
|
-
"""
|
179
|
-
html_chunk_re = re.compile("(\<!\[CDATA\[.*?\]\]\>|\<[^>]*\>|[^<]+)")
|
180
|
-
try:
|
181
|
-
parser = MyHTMLParser()
|
182
|
-
# We work around HTMLParser's limitations parsing CDATA
|
183
|
-
# by breaking the input into chunks and passing CDATA chunks
|
184
|
-
# through verbatim.
|
185
|
-
for chunk in re.finditer(html_chunk_re, html):
|
186
|
-
if chunk.group(0)[:8] == "<![CDATA":
|
187
|
-
parser.output += chunk.group(0)
|
188
|
-
else:
|
189
|
-
parser.feed(chunk.group(0))
|
190
|
-
parser.close()
|
191
|
-
return parser.output
|
192
|
-
except HTMLParseError as e:
|
193
|
-
sys.stderr.write("Normalization error: " + e.msg + "\n")
|
194
|
-
return html # on error, return unnormalized HTML
|
@@ -1,145 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python3
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
|
4
|
-
import re
|
5
|
-
import argparse
|
6
|
-
import sys
|
7
|
-
import platform
|
8
|
-
import itertools
|
9
|
-
import multiprocessing
|
10
|
-
from cmark import CMark
|
11
|
-
|
12
|
-
def hash_collisions():
|
13
|
-
REFMAP_SIZE = 16
|
14
|
-
COUNT = 50000
|
15
|
-
|
16
|
-
def badhash(ref):
|
17
|
-
h = 0
|
18
|
-
for c in ref:
|
19
|
-
a = (h << 6) & 0xFFFFFFFF
|
20
|
-
b = (h << 16) & 0xFFFFFFFF
|
21
|
-
h = ord(c) + a + b - h
|
22
|
-
h = h & 0xFFFFFFFF
|
23
|
-
|
24
|
-
return (h % REFMAP_SIZE) == 0
|
25
|
-
|
26
|
-
keys = ("x%d" % i for i in itertools.count())
|
27
|
-
collisions = itertools.islice((k for k in keys if badhash(k)), COUNT)
|
28
|
-
bad_key = next(collisions)
|
29
|
-
|
30
|
-
document = ''.join("[%s]: /url\n\n[%s]\n\n" % (key, bad_key) for key in collisions)
|
31
|
-
|
32
|
-
return document, re.compile("(<p>\[%s\]</p>\n){%d}" % (bad_key, COUNT-1))
|
33
|
-
|
34
|
-
allowed_failures = {"many references": True}
|
35
|
-
|
36
|
-
# list of pairs consisting of input and a regex that must match the output.
|
37
|
-
pathological = {
|
38
|
-
# note - some pythons have limit of 65535 for {num-matches} in re.
|
39
|
-
"nested strong emph":
|
40
|
-
(("*a **a " * 65000) + "b" + (" a** a*" * 65000),
|
41
|
-
re.compile("(<em>a <strong>a ){65000}b( a</strong> a</em>){65000}")),
|
42
|
-
"many emph closers with no openers":
|
43
|
-
(("a_ " * 65000),
|
44
|
-
re.compile("(a[_] ){64999}a_")),
|
45
|
-
"many emph openers with no closers":
|
46
|
-
(("_a " * 65000),
|
47
|
-
re.compile("(_a ){64999}_a")),
|
48
|
-
"many link closers with no openers":
|
49
|
-
(("a]" * 65000),
|
50
|
-
re.compile("(a\]){65000}")),
|
51
|
-
"many link openers with no closers":
|
52
|
-
(("[a" * 65000),
|
53
|
-
re.compile("(\[a){65000}")),
|
54
|
-
"mismatched openers and closers":
|
55
|
-
(("*a_ " * 50000),
|
56
|
-
re.compile("([*]a[_] ){49999}[*]a_")),
|
57
|
-
"openers and closers multiple of 3":
|
58
|
-
(("a**b" + ("c* " * 50000)),
|
59
|
-
re.compile("a[*][*]b(c[*] ){49999}c[*]")),
|
60
|
-
"link openers and emph closers":
|
61
|
-
(("[ a_" * 50000),
|
62
|
-
re.compile("(\[ a_){50000}")),
|
63
|
-
"hard link/emph case":
|
64
|
-
("**x [a*b**c*](d)",
|
65
|
-
re.compile("\\*\\*x <a href=\"d\">a<em>b\\*\\*c</em></a>")),
|
66
|
-
"nested brackets":
|
67
|
-
(("[" * 50000) + "a" + ("]" * 50000),
|
68
|
-
re.compile("\[{50000}a\]{50000}")),
|
69
|
-
"nested block quotes":
|
70
|
-
((("> " * 50000) + "a"),
|
71
|
-
re.compile("(<blockquote>\n){50000}")),
|
72
|
-
"U+0000 in input":
|
73
|
-
("abc\u0000de\u0000",
|
74
|
-
re.compile("abc\ufffd?de\ufffd?")),
|
75
|
-
"backticks":
|
76
|
-
("".join(map(lambda x: ("e" + "`" * x), range(1,10000))),
|
77
|
-
re.compile("^<p>[e`]*</p>\n$")),
|
78
|
-
"unclosed links A":
|
79
|
-
("[a](<b" * 50000,
|
80
|
-
re.compile("(\[a\]\(<b){50000}")),
|
81
|
-
"unclosed links B":
|
82
|
-
("[a](b" * 50000,
|
83
|
-
re.compile("(\[a\]\(b){50000}")),
|
84
|
-
"many references":
|
85
|
-
("".join(map(lambda x: ("[" + str(x) + "]: u\n"), range(1,50000 * 16))) + "[0] " * 50000,
|
86
|
-
re.compile("(\[0\] ){49999}")),
|
87
|
-
"reference collisions": hash_collisions()
|
88
|
-
}
|
89
|
-
|
90
|
-
whitespace_re = re.compile('/s+/')
|
91
|
-
passed = 0
|
92
|
-
errored = 0
|
93
|
-
ignored = 0
|
94
|
-
TIMEOUT = 5
|
95
|
-
|
96
|
-
def run_test(inp, regex):
|
97
|
-
parser = argparse.ArgumentParser(description='Run cmark tests.')
|
98
|
-
parser.add_argument('--program', dest='program', nargs='?', default=None,
|
99
|
-
help='program to test')
|
100
|
-
parser.add_argument('--library-dir', dest='library_dir', nargs='?',
|
101
|
-
default=None, help='directory containing dynamic library')
|
102
|
-
args = parser.parse_args(sys.argv[1:])
|
103
|
-
cmark = CMark(prog=args.program, library_dir=args.library_dir)
|
104
|
-
|
105
|
-
[rc, actual, err] = cmark.to_html(inp)
|
106
|
-
if rc != 0:
|
107
|
-
print('[ERRORED (return code %d)]' % rc)
|
108
|
-
print(err)
|
109
|
-
exit(1)
|
110
|
-
elif regex.search(actual):
|
111
|
-
print('[PASSED]')
|
112
|
-
else:
|
113
|
-
print('[FAILED (mismatch)]')
|
114
|
-
print(repr(actual))
|
115
|
-
exit(1)
|
116
|
-
|
117
|
-
if __name__ == '__main__':
|
118
|
-
print("Testing pathological cases:")
|
119
|
-
for description in pathological:
|
120
|
-
(inp, regex) = pathological[description]
|
121
|
-
print(description, "... ", end='')
|
122
|
-
sys.stdout.flush()
|
123
|
-
|
124
|
-
p = multiprocessing.Process(target=run_test, args=(inp, regex))
|
125
|
-
p.start()
|
126
|
-
p.join(TIMEOUT)
|
127
|
-
|
128
|
-
if p.is_alive():
|
129
|
-
p.terminate()
|
130
|
-
p.join()
|
131
|
-
print('[TIMED OUT]')
|
132
|
-
if allowed_failures[description]:
|
133
|
-
ignored += 1
|
134
|
-
else:
|
135
|
-
errored += 1
|
136
|
-
elif p.exitcode != 0:
|
137
|
-
if allowed_failures[description]:
|
138
|
-
ignored += 1
|
139
|
-
else:
|
140
|
-
errored += 1
|
141
|
-
else:
|
142
|
-
passed += 1
|
143
|
-
|
144
|
-
print("%d passed, %d errored, %d ignored" % (passed, errored, ignored))
|
145
|
-
exit(errored)
|
@@ -1,128 +0,0 @@
|
|
1
|
-
### Regression tests
|
2
|
-
|
3
|
-
Issue #113: EOL character weirdness on Windows
|
4
|
-
(Important: first line ends with CR + CR + LF)
|
5
|
-
|
6
|
-
```````````````````````````````` example
|
7
|
-
line1
|
8
|
-
line2
|
9
|
-
.
|
10
|
-
<p>line1</p>
|
11
|
-
<p>line2</p>
|
12
|
-
````````````````````````````````
|
13
|
-
|
14
|
-
Issue #114: cmark skipping first character in line
|
15
|
-
(Important: the blank lines around "Repeatedly" contain a tab.)
|
16
|
-
|
17
|
-
```````````````````````````````` example
|
18
|
-
By taking it apart
|
19
|
-
|
20
|
-
- alternative solutions
|
21
|
-
→
|
22
|
-
Repeatedly solving
|
23
|
-
→
|
24
|
-
- how techniques
|
25
|
-
.
|
26
|
-
<p>By taking it apart</p>
|
27
|
-
<ul>
|
28
|
-
<li>alternative solutions</li>
|
29
|
-
</ul>
|
30
|
-
<p>Repeatedly solving</p>
|
31
|
-
<ul>
|
32
|
-
<li>how techniques</li>
|
33
|
-
</ul>
|
34
|
-
````````````````````````````````
|
35
|
-
|
36
|
-
Issue jgm/CommonMark#430: h2..h6 not recognized as block tags.
|
37
|
-
|
38
|
-
```````````````````````````````` example
|
39
|
-
<h1>lorem</h1>
|
40
|
-
|
41
|
-
<h2>lorem</h2>
|
42
|
-
|
43
|
-
<h3>lorem</h3>
|
44
|
-
|
45
|
-
<h4>lorem</h4>
|
46
|
-
|
47
|
-
<h5>lorem</h5>
|
48
|
-
|
49
|
-
<h6>lorem</h6>
|
50
|
-
.
|
51
|
-
<h1>lorem</h1>
|
52
|
-
<h2>lorem</h2>
|
53
|
-
<h3>lorem</h3>
|
54
|
-
<h4>lorem</h4>
|
55
|
-
<h5>lorem</h5>
|
56
|
-
<h6>lorem</h6>
|
57
|
-
````````````````````````````````
|
58
|
-
|
59
|
-
Issue jgm/commonmark.js#109 - tabs after setext header line
|
60
|
-
|
61
|
-
|
62
|
-
```````````````````````````````` example
|
63
|
-
hi
|
64
|
-
--→
|
65
|
-
.
|
66
|
-
<h2>hi</h2>
|
67
|
-
````````````````````````````````
|
68
|
-
|
69
|
-
Issue #177 - incorrect emphasis parsing
|
70
|
-
|
71
|
-
```````````````````````````````` example
|
72
|
-
a***b* c*
|
73
|
-
.
|
74
|
-
<p>a*<em><em>b</em> c</em></p>
|
75
|
-
````````````````````````````````
|
76
|
-
|
77
|
-
Issue #193 - unescaped left angle brackets in link destination
|
78
|
-
|
79
|
-
```````````````````````````````` example
|
80
|
-
[a]
|
81
|
-
|
82
|
-
[a]: <te<st>
|
83
|
-
.
|
84
|
-
<p><a href="%3Cte%3Cst%3E">a</a></p>
|
85
|
-
````````````````````````````````
|
86
|
-
|
87
|
-
Issue #192 - escaped spaces in link destination
|
88
|
-
|
89
|
-
|
90
|
-
```````````````````````````````` example
|
91
|
-
[a](te\ st)
|
92
|
-
.
|
93
|
-
<p>[a](te\ st)</p>
|
94
|
-
````````````````````````````````
|
95
|
-
|
96
|
-
Issue github/github#76615: multiple delimiter combinations gets sketchy
|
97
|
-
|
98
|
-
|
99
|
-
```````````````````````````````` example strikethrough
|
100
|
-
~~**_`this`_**~~
|
101
|
-
~~***`this`***~~
|
102
|
-
~~___`this`___~~
|
103
|
-
|
104
|
-
**_`this`_**
|
105
|
-
***`this`***
|
106
|
-
___`this`___
|
107
|
-
|
108
|
-
~~**_this_**~~
|
109
|
-
~~***this***~~
|
110
|
-
~~___this___~~
|
111
|
-
|
112
|
-
**_this_**
|
113
|
-
***this***
|
114
|
-
___this___
|
115
|
-
.
|
116
|
-
<p><del><strong><em><code>this</code></em></strong></del><br />
|
117
|
-
<del><em><strong><code>this</code></strong></em></del><br />
|
118
|
-
<del><em><strong><code>this</code></strong></em></del></p>
|
119
|
-
<p><strong><em><code>this</code></em></strong><br />
|
120
|
-
<em><strong><code>this</code></strong></em><br />
|
121
|
-
<em><strong><code>this</code></strong></em></p>
|
122
|
-
<p><del><strong><em>this</em></strong></del><br />
|
123
|
-
<del><em><strong>this</strong></em></del><br />
|
124
|
-
<del><em><strong>this</strong></em></del></p>
|
125
|
-
<p><strong><em>this</em></strong><br />
|
126
|
-
<em><strong>this</strong></em><br />
|
127
|
-
<em><strong>this</strong></em></p>
|
128
|
-
````````````````````````````````
|