commonmarker 0.17.6 → 0.17.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of commonmarker might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Rakefile +0 -7
- data/ext/commonmarker/{cmark/src/arena.c → arena.c} +0 -0
- data/ext/commonmarker/{cmark/extensions/autolink.c → autolink.c} +0 -0
- data/ext/commonmarker/{cmark/extensions/autolink.h → autolink.h} +0 -0
- data/ext/commonmarker/{cmark/src/blocks.c → blocks.c} +0 -0
- data/ext/commonmarker/{cmark/src/buffer.c → buffer.c} +0 -0
- data/ext/commonmarker/{cmark/src/buffer.h → buffer.h} +0 -0
- data/ext/commonmarker/{cmark/src/case_fold_switch.inc → case_fold_switch.inc} +0 -0
- data/ext/commonmarker/{cmark/src/chunk.h → chunk.h} +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/CMakeLists.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/COPYING +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/FindAsan.cmake +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/Makefile +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/Makefile.nmake +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/README.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/CMakeLists.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/cplusplus.cpp +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/cplusplus.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/harness.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/harness.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/api_test/main.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/appveyor.yml +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-bq-flat.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-bq-nested.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-code.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-fences.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-heading.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-hr.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-html.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-lheading.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-list-flat.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-list-nested.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-ref-flat.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/block-ref-nested.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-autolink.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-backticks.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-em-flat.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-em-nested.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-em-worst.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-entity.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-escape.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-html.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-links-flat.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-links-nested.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/inline-newlines.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/lorem1.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/samples/rawtabs.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/statistics.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/bench/stats.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/benchmarks.md +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeCache.txt +478 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeCCompiler.cmake +71 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeCXXCompiler.cmake +73 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_C.bin +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_CXX.bin +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CMakeSystem.cmake +15 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdC/CMakeCCompilerId.c +567 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdC/a.out +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdCXX/CMakeCXXCompilerId.cpp +539 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/3.9.6/CompilerIdCXX/a.out +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeError.log +18 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/CMakeOutput.log +709 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/Makefile.cmake +157 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/Makefile2 +391 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/TargetDirectories.txt +48 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/cmake.check_cache +1 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.bin +0 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.c +34 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/feature_tests.cxx +405 -0
- data/ext/commonmarker/cmark-upstream/build/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/CTestTestfile.cmake +11 -0
- data/ext/commonmarker/cmark-upstream/build/Makefile +280 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/C.includecache +134 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/CXX.includecache +38 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/DependInfo.cmake +38 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/build.make +169 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/cmake_clean.cmake +12 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/cplusplus.cpp.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/depend.internal +28 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/depend.make +28 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/flags.make +17 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/harness.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/link.txt +1 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/main.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/api_test.dir/progress.make +5 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/Makefile +302 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/api_test +0 -0
- data/ext/commonmarker/cmark-upstream/build/api_test/cmake_install.cmake +29 -0
- data/ext/commonmarker/cmark-upstream/build/cmake_install.cmake +49 -0
- data/ext/commonmarker/cmark-upstream/build/compile_commands.json +352 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/Export/lib/cmake-gfmextensions/cmark-gfmextensions-release.cmake +30 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/Export/lib/cmake-gfmextensions/cmark-gfmextensions.cmake +108 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/C.includecache +246 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/DependInfo.cmake +36 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/autolink.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/build.make +253 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/cmake_clean.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/core-extensions.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/depend.internal +96 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/depend.make +96 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/ext_scanners.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/flags.make +10 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/link.txt +1 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/progress.make +8 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/strikethrough.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/table.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions.dir/tagfilter.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/C.includecache +246 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/DependInfo.cmake +29 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/autolink.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/build.make +249 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/cmake_clean.cmake +15 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/cmake_clean_target.cmake +3 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/core-extensions.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/depend.internal +96 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/depend.make +96 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/ext_scanners.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/flags.make +10 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/link.txt +2 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/progress.make +8 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/strikethrough.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/table.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/libcmark-gfmextensions_static.dir/tagfilter.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/Makefile +426 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/cmake_install.cmake +84 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/cmarkextensions_export.h +42 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.0.28.3.gfm.11.dylib +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.a +0 -0
- data/ext/commonmarker/cmark-upstream/build/extensions/libcmark-gfmextensions.dylib +1 -0
- data/ext/commonmarker/cmark-upstream/build/man/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/man/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/man/Makefile +196 -0
- data/ext/commonmarker/cmark-upstream/build/man/cmake_install.cmake +37 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/Export/lib/cmake/cmark-gfm-release.cmake +38 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/Export/lib/cmake/cmark-gfm.cmake +95 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/C.includecache +156 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/DependInfo.cmake +30 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/build.make +115 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/cmake_clean.cmake +10 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/depend.internal +20 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/depend.make +20 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/flags.make +10 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/link.txt +1 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/main.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/cmark-gfm.dir/progress.make +3 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/C.includecache +612 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/DependInfo.cmake +60 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/arena.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/blocks.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/buffer.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/build.make +819 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmake_clean.cmake +37 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmark.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/cmark_ctype.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/commonmark.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/depend.internal +319 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/depend.make +319 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/flags.make +10 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/footnotes.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_href_e.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_html_e.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/houdini_html_u.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/html.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/inlines.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/iterator.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/latex.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/link.txt +1 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/linked_list.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/man.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/map.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/node.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/plaintext.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/plugin.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/progress.make +29 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/references.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/registry.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/render.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/scanners.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/syntax_extension.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/utf8.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm.dir/xml.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/C.includecache +612 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/DependInfo.cmake +54 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/arena.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/blocks.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/buffer.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/build.make +816 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmake_clean.cmake +36 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmake_clean_target.cmake +3 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmark.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/cmark_ctype.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/commonmark.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/depend.internal +319 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/depend.make +319 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/flags.make +10 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/footnotes.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_href_e.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_html_e.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/houdini_html_u.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/html.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/inlines.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/iterator.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/latex.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/link.txt +2 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/linked_list.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/man.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/map.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/node.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/plaintext.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/plugin.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/progress.make +29 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/references.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/registry.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/render.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/scanners.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/syntax_extension.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/utf8.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/libcmark-gfm_static.dir/xml.c.o +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/src/Makefile +1165 -0
- data/ext/commonmarker/cmark-upstream/build/src/cmake_install.cmake +97 -0
- data/ext/commonmarker/cmark-upstream/build/src/cmark-gfm +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/cmark_export.h +42 -0
- data/ext/commonmarker/cmark-upstream/build/src/cmark_version.h +8 -0
- data/ext/commonmarker/cmark-upstream/build/src/config.h +76 -0
- data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.0.28.3.gfm.11.dylib +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.a +0 -0
- data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.dylib +1 -0
- data/ext/commonmarker/cmark-upstream/build/src/libcmark-gfm.pc +10 -0
- data/ext/commonmarker/cmark-upstream/build/testdir/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/commonmarker/cmark-upstream/build/testdir/CMakeFiles/progress.marks +1 -0
- data/ext/commonmarker/cmark-upstream/build/testdir/CTestTestfile.cmake +17 -0
- data/ext/commonmarker/cmark-upstream/build/testdir/Makefile +196 -0
- data/ext/commonmarker/cmark-upstream/build/testdir/cmake_install.cmake +29 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/changelog.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/data/CaseFolding.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/CMakeLists.txt +0 -0
- data/ext/commonmarker/cmark-upstream/extensions/autolink.c +421 -0
- data/ext/commonmarker/cmark-upstream/extensions/autolink.h +8 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/core-extensions.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/core-extensions.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/ext_scanners.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/ext_scanners.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/ext_scanners.re +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/strikethrough.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/strikethrough.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/table.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/table.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/tagfilter.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/extensions/tagfilter.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/man/CMakeLists.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/man/make_man_page.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/man/man1/cmark-gfm.1 +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/man/man3/cmark-gfm.3 +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/nmake.bat +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/CMakeLists.txt +0 -0
- data/ext/commonmarker/cmark-upstream/src/arena.c +103 -0
- data/ext/commonmarker/cmark-upstream/src/blocks.c +1519 -0
- data/ext/commonmarker/cmark-upstream/src/buffer.c +279 -0
- data/ext/commonmarker/cmark-upstream/src/buffer.h +116 -0
- data/ext/commonmarker/cmark-upstream/src/case_fold_switch.inc +4327 -0
- data/ext/commonmarker/cmark-upstream/src/chunk.h +136 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_ctype.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_ctype.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_extension_api.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/cmark_version.h.in +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/commonmark.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/config.h.in +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/entities.inc +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/footnotes.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/footnotes.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini_href_e.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini_html_e.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/houdini_html_u.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/html.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/html.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/inlines.c +8 -4
- data/ext/commonmarker/{cmark → cmark-upstream}/src/inlines.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/iterator.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/iterator.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/latex.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/libcmark-gfm.pc.in +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/linked_list.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/main.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/man.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/map.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/map.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/node.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/node.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/parser.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/plaintext.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/plugin.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/plugin.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/references.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/references.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/registry.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/registry.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/render.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/render.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/scanners.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/scanners.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/scanners.re +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/syntax_extension.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/syntax_extension.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/utf8.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/utf8.h +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/src/xml.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/suppressions +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/CMakeLists.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/afl_test_cases/test.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/cmark-fuzz.c +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/cmark.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/entity_tests.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/extensions.txt +2 -2
- data/ext/commonmarker/{cmark → cmark-upstream}/test/fuzzing_dictionary +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/normalize.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/pathological_tests.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/regression.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/roundtrip_tests.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/run-cmark-fuzz +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/smart_punct.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/spec.txt +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/test/spec_tests.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/toolchain-mingw32.cmake +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/tools/Dockerfile +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/tools/appveyor-build.bat +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/tools/make_entities_inc.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/tools/mkcasefold.pl +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/why-cmark-and-not-x.md +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.js +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.py +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.rb +0 -0
- data/ext/commonmarker/{cmark → cmark-upstream}/wrappers/wrapper.rkt +0 -0
- data/ext/commonmarker/cmark.c +55 -0
- data/ext/commonmarker/cmark.h +789 -0
- data/ext/commonmarker/cmark_ctype.c +44 -0
- data/ext/commonmarker/cmark_ctype.h +33 -0
- data/ext/commonmarker/cmark_export.h +42 -0
- data/ext/commonmarker/cmark_extension_api.h +719 -0
- data/ext/commonmarker/cmark_version.h +8 -0
- data/ext/commonmarker/cmarkextensions_export.h +42 -0
- data/ext/commonmarker/commonmark.c +508 -0
- data/ext/commonmarker/config.h +76 -0
- data/ext/commonmarker/core-extensions.c +25 -0
- data/ext/commonmarker/core-extensions.h +25 -0
- data/ext/commonmarker/entities.inc +2138 -0
- data/ext/commonmarker/ext_scanners.c +941 -0
- data/ext/commonmarker/ext_scanners.h +22 -0
- data/ext/commonmarker/extconf.rb +1 -48
- data/ext/commonmarker/footnotes.c +40 -0
- data/ext/commonmarker/footnotes.h +25 -0
- data/ext/commonmarker/houdini.h +57 -0
- data/ext/commonmarker/houdini_href_e.c +100 -0
- data/ext/commonmarker/houdini_html_e.c +66 -0
- data/ext/commonmarker/houdini_html_u.c +149 -0
- data/ext/commonmarker/html.c +457 -0
- data/ext/commonmarker/html.h +27 -0
- data/ext/commonmarker/inlines.c +1594 -0
- data/ext/commonmarker/inlines.h +29 -0
- data/ext/commonmarker/iterator.c +159 -0
- data/ext/commonmarker/iterator.h +27 -0
- data/ext/commonmarker/latex.c +466 -0
- data/ext/commonmarker/linked_list.c +37 -0
- data/ext/commonmarker/man.c +278 -0
- data/ext/commonmarker/map.c +122 -0
- data/ext/commonmarker/map.h +42 -0
- data/ext/commonmarker/node.c +965 -0
- data/ext/commonmarker/node.h +116 -0
- data/ext/commonmarker/parser.h +57 -0
- data/ext/commonmarker/plaintext.c +213 -0
- data/ext/commonmarker/plugin.c +36 -0
- data/ext/commonmarker/plugin.h +34 -0
- data/ext/commonmarker/references.c +42 -0
- data/ext/commonmarker/references.h +26 -0
- data/ext/commonmarker/registry.c +63 -0
- data/ext/commonmarker/registry.h +24 -0
- data/ext/commonmarker/render.c +202 -0
- data/ext/commonmarker/render.h +63 -0
- data/ext/commonmarker/scanners.c +18195 -0
- data/ext/commonmarker/scanners.h +64 -0
- data/ext/commonmarker/scanners.re +341 -0
- data/ext/commonmarker/strikethrough.c +157 -0
- data/ext/commonmarker/strikethrough.h +9 -0
- data/ext/commonmarker/syntax_extension.c +139 -0
- data/ext/commonmarker/syntax_extension.h +32 -0
- data/ext/commonmarker/table.c +683 -0
- data/ext/commonmarker/table.h +8 -0
- data/ext/commonmarker/tagfilter.c +60 -0
- data/ext/commonmarker/tagfilter.h +8 -0
- data/ext/commonmarker/utf8.c +317 -0
- data/ext/commonmarker/utf8.h +35 -0
- data/ext/commonmarker/xml.c +174 -0
- data/lib/commonmarker/version.rb +1 -1
- data/test/test_helper.rb +1 -1
- metadata +401 -145
@@ -0,0 +1,37 @@
|
|
1
|
+
#include <stdlib.h>
|
2
|
+
|
3
|
+
#include "cmark.h"
|
4
|
+
|
5
|
+
cmark_llist *cmark_llist_append(cmark_mem *mem, cmark_llist *head, void *data) {
|
6
|
+
cmark_llist *tmp;
|
7
|
+
cmark_llist *new_node = (cmark_llist *) mem->calloc(1, sizeof(cmark_llist));
|
8
|
+
|
9
|
+
new_node->data = data;
|
10
|
+
new_node->next = NULL;
|
11
|
+
|
12
|
+
if (!head)
|
13
|
+
return new_node;
|
14
|
+
|
15
|
+
for (tmp = head; tmp->next; tmp=tmp->next);
|
16
|
+
|
17
|
+
tmp->next = new_node;
|
18
|
+
|
19
|
+
return head;
|
20
|
+
}
|
21
|
+
|
22
|
+
void cmark_llist_free_full(cmark_mem *mem, cmark_llist *head, cmark_free_func free_func) {
|
23
|
+
cmark_llist *tmp, *prev;
|
24
|
+
|
25
|
+
for (tmp = head; tmp;) {
|
26
|
+
if (free_func)
|
27
|
+
free_func(mem, tmp->data);
|
28
|
+
|
29
|
+
prev = tmp;
|
30
|
+
tmp = tmp->next;
|
31
|
+
mem->free(prev);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
void cmark_llist_free(cmark_mem *mem, cmark_llist *head) {
|
36
|
+
cmark_llist_free_full(mem, head, NULL);
|
37
|
+
}
|
@@ -0,0 +1,278 @@
|
|
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 "utf8.h"
|
11
|
+
#include "render.h"
|
12
|
+
#include "syntax_extension.h"
|
13
|
+
|
14
|
+
#define OUT(s, wrap, escaping) renderer->out(renderer, node, s, wrap, escaping)
|
15
|
+
#define LIT(s) renderer->out(renderer, node, s, false, LITERAL)
|
16
|
+
#define CR() renderer->cr(renderer)
|
17
|
+
#define BLANKLINE() renderer->blankline(renderer)
|
18
|
+
#define LIST_NUMBER_SIZE 20
|
19
|
+
|
20
|
+
// Functions to convert cmark_nodes to groff man strings.
|
21
|
+
static void S_outc(cmark_renderer *renderer, cmark_node *node,
|
22
|
+
cmark_escaping escape, int32_t c,
|
23
|
+
unsigned char nextc) {
|
24
|
+
(void)(nextc);
|
25
|
+
|
26
|
+
if (escape == LITERAL) {
|
27
|
+
cmark_render_code_point(renderer, c);
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
|
31
|
+
switch (c) {
|
32
|
+
case 46:
|
33
|
+
if (renderer->begin_line) {
|
34
|
+
cmark_render_ascii(renderer, "\\&.");
|
35
|
+
} else {
|
36
|
+
cmark_render_code_point(renderer, c);
|
37
|
+
}
|
38
|
+
break;
|
39
|
+
case 39:
|
40
|
+
if (renderer->begin_line) {
|
41
|
+
cmark_render_ascii(renderer, "\\&'");
|
42
|
+
} else {
|
43
|
+
cmark_render_code_point(renderer, c);
|
44
|
+
}
|
45
|
+
break;
|
46
|
+
case 45:
|
47
|
+
cmark_render_ascii(renderer, "\\-");
|
48
|
+
break;
|
49
|
+
case 92:
|
50
|
+
cmark_render_ascii(renderer, "\\e");
|
51
|
+
break;
|
52
|
+
case 8216: // left single quote
|
53
|
+
cmark_render_ascii(renderer, "\\[oq]");
|
54
|
+
break;
|
55
|
+
case 8217: // right single quote
|
56
|
+
cmark_render_ascii(renderer, "\\[cq]");
|
57
|
+
break;
|
58
|
+
case 8220: // left double quote
|
59
|
+
cmark_render_ascii(renderer, "\\[lq]");
|
60
|
+
break;
|
61
|
+
case 8221: // right double quote
|
62
|
+
cmark_render_ascii(renderer, "\\[rq]");
|
63
|
+
break;
|
64
|
+
case 8212: // em dash
|
65
|
+
cmark_render_ascii(renderer, "\\[em]");
|
66
|
+
break;
|
67
|
+
case 8211: // en dash
|
68
|
+
cmark_render_ascii(renderer, "\\[en]");
|
69
|
+
break;
|
70
|
+
default:
|
71
|
+
cmark_render_code_point(renderer, c);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
static int S_render_node(cmark_renderer *renderer, cmark_node *node,
|
76
|
+
cmark_event_type ev_type, int options) {
|
77
|
+
cmark_node *tmp;
|
78
|
+
int list_number;
|
79
|
+
bool entering = (ev_type == CMARK_EVENT_ENTER);
|
80
|
+
bool allow_wrap = renderer->width > 0 && !(CMARK_OPT_NOBREAKS & options);
|
81
|
+
|
82
|
+
if (node->extension && node->extension->man_render_func) {
|
83
|
+
node->extension->man_render_func(node->extension, renderer, node, ev_type, options);
|
84
|
+
return 1;
|
85
|
+
}
|
86
|
+
|
87
|
+
switch (node->type) {
|
88
|
+
case CMARK_NODE_DOCUMENT:
|
89
|
+
if (entering) {
|
90
|
+
/* Define a strikethrough macro */
|
91
|
+
/* Commenting out because this makes tests fail
|
92
|
+
LIT(".de ST");
|
93
|
+
CR();
|
94
|
+
LIT(".nr ww \\w'\\\\$1'");
|
95
|
+
CR();
|
96
|
+
LIT("\\Z@\\v'-.25m'\\l'\\\\n[ww]u'@\\\\$1");
|
97
|
+
CR();
|
98
|
+
LIT("..");
|
99
|
+
CR();
|
100
|
+
*/
|
101
|
+
}
|
102
|
+
break;
|
103
|
+
|
104
|
+
case CMARK_NODE_BLOCK_QUOTE:
|
105
|
+
if (entering) {
|
106
|
+
CR();
|
107
|
+
LIT(".RS");
|
108
|
+
CR();
|
109
|
+
} else {
|
110
|
+
CR();
|
111
|
+
LIT(".RE");
|
112
|
+
CR();
|
113
|
+
}
|
114
|
+
break;
|
115
|
+
|
116
|
+
case CMARK_NODE_LIST:
|
117
|
+
break;
|
118
|
+
|
119
|
+
case CMARK_NODE_ITEM:
|
120
|
+
if (entering) {
|
121
|
+
CR();
|
122
|
+
LIT(".IP ");
|
123
|
+
if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) {
|
124
|
+
LIT("\\[bu] 2");
|
125
|
+
} else {
|
126
|
+
list_number = cmark_node_get_list_start(node->parent);
|
127
|
+
tmp = node;
|
128
|
+
while (tmp->prev) {
|
129
|
+
tmp = tmp->prev;
|
130
|
+
list_number += 1;
|
131
|
+
}
|
132
|
+
char list_number_s[LIST_NUMBER_SIZE];
|
133
|
+
snprintf(list_number_s, LIST_NUMBER_SIZE, "\"%d.\" 4", list_number);
|
134
|
+
LIT(list_number_s);
|
135
|
+
}
|
136
|
+
CR();
|
137
|
+
} else {
|
138
|
+
CR();
|
139
|
+
}
|
140
|
+
break;
|
141
|
+
|
142
|
+
case CMARK_NODE_HEADING:
|
143
|
+
if (entering) {
|
144
|
+
CR();
|
145
|
+
LIT(cmark_node_get_heading_level(node) == 1 ? ".SH" : ".SS");
|
146
|
+
CR();
|
147
|
+
} else {
|
148
|
+
CR();
|
149
|
+
}
|
150
|
+
break;
|
151
|
+
|
152
|
+
case CMARK_NODE_CODE_BLOCK:
|
153
|
+
CR();
|
154
|
+
LIT(".IP\n.nf\n\\f[C]\n");
|
155
|
+
OUT(cmark_node_get_literal(node), false, NORMAL);
|
156
|
+
CR();
|
157
|
+
LIT("\\f[]\n.fi");
|
158
|
+
CR();
|
159
|
+
break;
|
160
|
+
|
161
|
+
case CMARK_NODE_HTML_BLOCK:
|
162
|
+
break;
|
163
|
+
|
164
|
+
case CMARK_NODE_CUSTOM_BLOCK:
|
165
|
+
CR();
|
166
|
+
OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),
|
167
|
+
false, LITERAL);
|
168
|
+
CR();
|
169
|
+
break;
|
170
|
+
|
171
|
+
case CMARK_NODE_THEMATIC_BREAK:
|
172
|
+
CR();
|
173
|
+
LIT(".PP\n * * * * *");
|
174
|
+
CR();
|
175
|
+
break;
|
176
|
+
|
177
|
+
case CMARK_NODE_PARAGRAPH:
|
178
|
+
if (entering) {
|
179
|
+
// no blank line if first paragraph in list:
|
180
|
+
if (node->parent && node->parent->type == CMARK_NODE_ITEM &&
|
181
|
+
node->prev == NULL) {
|
182
|
+
// no blank line or .PP
|
183
|
+
} else {
|
184
|
+
CR();
|
185
|
+
LIT(".PP");
|
186
|
+
CR();
|
187
|
+
}
|
188
|
+
} else {
|
189
|
+
CR();
|
190
|
+
}
|
191
|
+
break;
|
192
|
+
|
193
|
+
case CMARK_NODE_TEXT:
|
194
|
+
OUT(cmark_node_get_literal(node), allow_wrap, NORMAL);
|
195
|
+
break;
|
196
|
+
|
197
|
+
case CMARK_NODE_LINEBREAK:
|
198
|
+
LIT(".PD 0\n.P\n.PD");
|
199
|
+
CR();
|
200
|
+
break;
|
201
|
+
|
202
|
+
case CMARK_NODE_SOFTBREAK:
|
203
|
+
if (options & CMARK_OPT_HARDBREAKS) {
|
204
|
+
LIT(".PD 0\n.P\n.PD");
|
205
|
+
CR();
|
206
|
+
} else if (renderer->width == 0 && !(CMARK_OPT_NOBREAKS & options)) {
|
207
|
+
CR();
|
208
|
+
} else {
|
209
|
+
OUT(" ", allow_wrap, LITERAL);
|
210
|
+
}
|
211
|
+
break;
|
212
|
+
|
213
|
+
case CMARK_NODE_CODE:
|
214
|
+
LIT("\\f[C]");
|
215
|
+
OUT(cmark_node_get_literal(node), allow_wrap, NORMAL);
|
216
|
+
LIT("\\f[]");
|
217
|
+
break;
|
218
|
+
|
219
|
+
case CMARK_NODE_HTML_INLINE:
|
220
|
+
break;
|
221
|
+
|
222
|
+
case CMARK_NODE_CUSTOM_INLINE:
|
223
|
+
OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),
|
224
|
+
false, LITERAL);
|
225
|
+
break;
|
226
|
+
|
227
|
+
case CMARK_NODE_STRONG:
|
228
|
+
if (entering) {
|
229
|
+
LIT("\\f[B]");
|
230
|
+
} else {
|
231
|
+
LIT("\\f[]");
|
232
|
+
}
|
233
|
+
break;
|
234
|
+
|
235
|
+
case CMARK_NODE_EMPH:
|
236
|
+
if (entering) {
|
237
|
+
LIT("\\f[I]");
|
238
|
+
} else {
|
239
|
+
LIT("\\f[]");
|
240
|
+
}
|
241
|
+
break;
|
242
|
+
|
243
|
+
case CMARK_NODE_LINK:
|
244
|
+
if (!entering) {
|
245
|
+
LIT(" (");
|
246
|
+
OUT(cmark_node_get_url(node), allow_wrap, URL);
|
247
|
+
LIT(")");
|
248
|
+
}
|
249
|
+
break;
|
250
|
+
|
251
|
+
case CMARK_NODE_IMAGE:
|
252
|
+
if (entering) {
|
253
|
+
LIT("[IMAGE: ");
|
254
|
+
} else {
|
255
|
+
LIT("]");
|
256
|
+
}
|
257
|
+
break;
|
258
|
+
|
259
|
+
case CMARK_NODE_FOOTNOTE_DEFINITION:
|
260
|
+
case CMARK_NODE_FOOTNOTE_REFERENCE:
|
261
|
+
// TODO
|
262
|
+
break;
|
263
|
+
|
264
|
+
default:
|
265
|
+
assert(false);
|
266
|
+
break;
|
267
|
+
}
|
268
|
+
|
269
|
+
return 1;
|
270
|
+
}
|
271
|
+
|
272
|
+
char *cmark_render_man(cmark_node *root, int options, int width) {
|
273
|
+
return cmark_render_man_with_mem(root, options, width, cmark_node_mem(root));
|
274
|
+
}
|
275
|
+
|
276
|
+
char *cmark_render_man_with_mem(cmark_node *root, int options, int width, cmark_mem *mem) {
|
277
|
+
return cmark_render(mem, root, options, width, S_outc, S_render_node);
|
278
|
+
}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
#include "map.h"
|
2
|
+
#include "utf8.h"
|
3
|
+
#include "parser.h"
|
4
|
+
|
5
|
+
// normalize map label: collapse internal whitespace to single space,
|
6
|
+
// remove leading/trailing whitespace, case fold
|
7
|
+
// Return NULL if the label is actually empty (i.e. composed solely from
|
8
|
+
// whitespace)
|
9
|
+
unsigned char *normalize_map_label(cmark_mem *mem, cmark_chunk *ref) {
|
10
|
+
cmark_strbuf normalized = CMARK_BUF_INIT(mem);
|
11
|
+
unsigned char *result;
|
12
|
+
|
13
|
+
if (ref == NULL)
|
14
|
+
return NULL;
|
15
|
+
|
16
|
+
if (ref->len == 0)
|
17
|
+
return NULL;
|
18
|
+
|
19
|
+
cmark_utf8proc_case_fold(&normalized, ref->data, ref->len);
|
20
|
+
cmark_strbuf_trim(&normalized);
|
21
|
+
cmark_strbuf_normalize_whitespace(&normalized);
|
22
|
+
|
23
|
+
result = cmark_strbuf_detach(&normalized);
|
24
|
+
assert(result);
|
25
|
+
|
26
|
+
if (result[0] == '\0') {
|
27
|
+
mem->free(result);
|
28
|
+
return NULL;
|
29
|
+
}
|
30
|
+
|
31
|
+
return result;
|
32
|
+
}
|
33
|
+
|
34
|
+
static int
|
35
|
+
labelcmp(const unsigned char *a, const unsigned char *b) {
|
36
|
+
return strcmp((const char *)a, (const char *)b);
|
37
|
+
}
|
38
|
+
|
39
|
+
static int
|
40
|
+
refcmp(const void *p1, const void *p2) {
|
41
|
+
cmark_map_entry *r1 = *(cmark_map_entry **)p1;
|
42
|
+
cmark_map_entry *r2 = *(cmark_map_entry **)p2;
|
43
|
+
int res = labelcmp(r1->label, r2->label);
|
44
|
+
return res ? res : ((int)r1->age - (int)r2->age);
|
45
|
+
}
|
46
|
+
|
47
|
+
static int
|
48
|
+
refsearch(const void *label, const void *p2) {
|
49
|
+
cmark_map_entry *ref = *(cmark_map_entry **)p2;
|
50
|
+
return labelcmp((const unsigned char *)label, ref->label);
|
51
|
+
}
|
52
|
+
|
53
|
+
static void sort_map(cmark_map *map) {
|
54
|
+
unsigned int i = 0, last = 0, size = map->size;
|
55
|
+
cmark_map_entry *r = map->refs, **sorted = NULL;
|
56
|
+
|
57
|
+
sorted = (cmark_map_entry **)map->mem->calloc(size, sizeof(cmark_map_entry *));
|
58
|
+
while (r) {
|
59
|
+
sorted[i++] = r;
|
60
|
+
r = r->next;
|
61
|
+
}
|
62
|
+
|
63
|
+
qsort(sorted, size, sizeof(cmark_map_entry *), refcmp);
|
64
|
+
|
65
|
+
for (i = 1; i < size; i++) {
|
66
|
+
if (labelcmp(sorted[i]->label, sorted[last]->label) != 0)
|
67
|
+
sorted[++last] = sorted[i];
|
68
|
+
}
|
69
|
+
|
70
|
+
map->sorted = sorted;
|
71
|
+
map->size = last + 1;
|
72
|
+
}
|
73
|
+
|
74
|
+
cmark_map_entry *cmark_map_lookup(cmark_map *map, cmark_chunk *label) {
|
75
|
+
cmark_map_entry **ref = NULL;
|
76
|
+
unsigned char *norm;
|
77
|
+
|
78
|
+
if (label->len < 1 || label->len > MAX_LINK_LABEL_LENGTH)
|
79
|
+
return NULL;
|
80
|
+
|
81
|
+
if (map == NULL || !map->size)
|
82
|
+
return NULL;
|
83
|
+
|
84
|
+
norm = normalize_map_label(map->mem, label);
|
85
|
+
if (norm == NULL)
|
86
|
+
return NULL;
|
87
|
+
|
88
|
+
if (!map->sorted)
|
89
|
+
sort_map(map);
|
90
|
+
|
91
|
+
ref = (cmark_map_entry **)bsearch(norm, map->sorted, map->size, sizeof(cmark_map_entry *), refsearch);
|
92
|
+
map->mem->free(norm);
|
93
|
+
|
94
|
+
if (!ref)
|
95
|
+
return NULL;
|
96
|
+
|
97
|
+
return ref[0];
|
98
|
+
}
|
99
|
+
|
100
|
+
void cmark_map_free(cmark_map *map) {
|
101
|
+
cmark_map_entry *ref;
|
102
|
+
|
103
|
+
if (map == NULL)
|
104
|
+
return;
|
105
|
+
|
106
|
+
ref = map->refs;
|
107
|
+
while (ref) {
|
108
|
+
cmark_map_entry *next = ref->next;
|
109
|
+
map->free(map, ref);
|
110
|
+
ref = next;
|
111
|
+
}
|
112
|
+
|
113
|
+
map->mem->free(map->sorted);
|
114
|
+
map->mem->free(map);
|
115
|
+
}
|
116
|
+
|
117
|
+
cmark_map *cmark_map_new(cmark_mem *mem, cmark_map_free_f free) {
|
118
|
+
cmark_map *map = (cmark_map *)mem->calloc(1, sizeof(cmark_map));
|
119
|
+
map->mem = mem;
|
120
|
+
map->free = free;
|
121
|
+
return map;
|
122
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#ifndef CMARK_MAP_H
|
2
|
+
#define CMARK_MAP_H
|
3
|
+
|
4
|
+
#include "memory.h"
|
5
|
+
#include "chunk.h"
|
6
|
+
|
7
|
+
#ifdef __cplusplus
|
8
|
+
extern "C" {
|
9
|
+
#endif
|
10
|
+
|
11
|
+
struct cmark_map_entry {
|
12
|
+
struct cmark_map_entry *next;
|
13
|
+
unsigned char *label;
|
14
|
+
unsigned int age;
|
15
|
+
};
|
16
|
+
|
17
|
+
typedef struct cmark_map_entry cmark_map_entry;
|
18
|
+
|
19
|
+
struct cmark_map;
|
20
|
+
|
21
|
+
typedef void (*cmark_map_free_f)(struct cmark_map *, cmark_map_entry *);
|
22
|
+
|
23
|
+
struct cmark_map {
|
24
|
+
cmark_mem *mem;
|
25
|
+
cmark_map_entry *refs;
|
26
|
+
cmark_map_entry **sorted;
|
27
|
+
unsigned int size;
|
28
|
+
cmark_map_free_f free;
|
29
|
+
};
|
30
|
+
|
31
|
+
typedef struct cmark_map cmark_map;
|
32
|
+
|
33
|
+
unsigned char *normalize_map_label(cmark_mem *mem, cmark_chunk *ref);
|
34
|
+
cmark_map *cmark_map_new(cmark_mem *mem, cmark_map_free_f free);
|
35
|
+
void cmark_map_free(cmark_map *map);
|
36
|
+
cmark_map_entry *cmark_map_lookup(cmark_map *map, cmark_chunk *label);
|
37
|
+
|
38
|
+
#ifdef __cplusplus
|
39
|
+
}
|
40
|
+
#endif
|
41
|
+
|
42
|
+
#endif
|