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,60 +0,0 @@
|
|
1
|
-
#include "tagfilter.h"
|
2
|
-
#include <parser.h>
|
3
|
-
#include <ctype.h>
|
4
|
-
|
5
|
-
static const char *blacklist[] = {
|
6
|
-
"title", "textarea", "style", "xmp", "iframe",
|
7
|
-
"noembed", "noframes", "script", "plaintext", NULL,
|
8
|
-
};
|
9
|
-
|
10
|
-
static int is_tag(const unsigned char *tag_data, size_t tag_size,
|
11
|
-
const char *tagname) {
|
12
|
-
size_t i;
|
13
|
-
|
14
|
-
if (tag_size < 3 || tag_data[0] != '<')
|
15
|
-
return 0;
|
16
|
-
|
17
|
-
i = 1;
|
18
|
-
|
19
|
-
if (tag_data[i] == '/') {
|
20
|
-
i++;
|
21
|
-
}
|
22
|
-
|
23
|
-
for (; i < tag_size; ++i, ++tagname) {
|
24
|
-
if (*tagname == 0)
|
25
|
-
break;
|
26
|
-
|
27
|
-
if (tolower(tag_data[i]) != *tagname)
|
28
|
-
return 0;
|
29
|
-
}
|
30
|
-
|
31
|
-
if (i == tag_size)
|
32
|
-
return 0;
|
33
|
-
|
34
|
-
if (cmark_isspace(tag_data[i]) || tag_data[i] == '>')
|
35
|
-
return 1;
|
36
|
-
|
37
|
-
if (tag_data[i] == '/' && tag_size >= i + 2 && tag_data[i + 1] == '>')
|
38
|
-
return 1;
|
39
|
-
|
40
|
-
return 0;
|
41
|
-
}
|
42
|
-
|
43
|
-
static int filter(cmark_syntax_extension *ext, const unsigned char *tag,
|
44
|
-
size_t tag_len) {
|
45
|
-
const char **it;
|
46
|
-
|
47
|
-
for (it = blacklist; *it; ++it) {
|
48
|
-
if (is_tag(tag, tag_len, *it)) {
|
49
|
-
return 0;
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
|
-
return 1;
|
54
|
-
}
|
55
|
-
|
56
|
-
cmark_syntax_extension *create_tagfilter_extension(void) {
|
57
|
-
cmark_syntax_extension *ext = cmark_syntax_extension_new("tagfilter");
|
58
|
-
cmark_syntax_extension_set_html_filter_func(ext, filter);
|
59
|
-
return ext;
|
60
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
if (NOT MSVC)
|
2
|
-
|
3
|
-
include(GNUInstallDirs)
|
4
|
-
|
5
|
-
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark-gfm.1
|
6
|
-
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
7
|
-
|
8
|
-
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man3/cmark-gfm.3
|
9
|
-
DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
|
10
|
-
endif(NOT MSVC)
|
@@ -1,133 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python
|
2
|
-
|
3
|
-
# Creates a man page from a C file.
|
4
|
-
|
5
|
-
# first argument if present is path to cmark dynamic library
|
6
|
-
|
7
|
-
# Comments beginning with `/**` are treated as Groff man, except that
|
8
|
-
# 'this' is converted to \fIthis\f[], and ''this'' to \fBthis\f[].
|
9
|
-
|
10
|
-
# Non-blank lines immediately following a man page comment are treated
|
11
|
-
# as function signatures or examples and parsed into .Ft, .Fo, .Fa, .Fc. The
|
12
|
-
# immediately preceding man documentation chunk is printed after the example
|
13
|
-
# as a comment on it.
|
14
|
-
|
15
|
-
# That's about it!
|
16
|
-
|
17
|
-
import sys, re, os, platform
|
18
|
-
from datetime import date
|
19
|
-
from ctypes import CDLL, c_char_p, c_long, c_void_p
|
20
|
-
|
21
|
-
sysname = platform.system()
|
22
|
-
|
23
|
-
if sysname == 'Darwin':
|
24
|
-
cmark = CDLL("build/src/libcmark-gfm.dylib")
|
25
|
-
else:
|
26
|
-
cmark = CDLL("build/src/libcmark-gfm.so")
|
27
|
-
|
28
|
-
parse_document = cmark.cmark_parse_document
|
29
|
-
parse_document.restype = c_void_p
|
30
|
-
parse_document.argtypes = [c_char_p, c_long]
|
31
|
-
|
32
|
-
render_man = cmark.cmark_render_man
|
33
|
-
render_man.restype = c_char_p
|
34
|
-
render_man.argtypes = [c_void_p, c_long, c_long]
|
35
|
-
|
36
|
-
def md2man(text):
|
37
|
-
if sys.version_info >= (3,0):
|
38
|
-
textbytes = text.encode('utf-8')
|
39
|
-
textlen = len(textbytes)
|
40
|
-
return render_man(parse_document(textbytes, textlen), 0, 65).decode('utf-8')
|
41
|
-
else:
|
42
|
-
textbytes = text
|
43
|
-
textlen = len(text)
|
44
|
-
return render_man(parse_document(textbytes, textlen), 0, 72)
|
45
|
-
|
46
|
-
comment_start_re = re.compile('^\/\*\* ?')
|
47
|
-
comment_delim_re = re.compile('^[/ ]\** ?')
|
48
|
-
comment_end_re = re.compile('^ \**\/')
|
49
|
-
function_re = re.compile('^ *(?:CMARK_EXPORT\s+)?(?P<type>(?:const\s+)?\w+(?:\s*[*])?)\s*(?P<name>\w+)\s*\((?P<args>[^)]*)\)')
|
50
|
-
blank_re = re.compile('^\s*$')
|
51
|
-
macro_re = re.compile('CMARK_EXPORT *')
|
52
|
-
typedef_start_re = re.compile('typedef.*{$')
|
53
|
-
typedef_end_re = re.compile('}')
|
54
|
-
single_quote_re = re.compile("(?<!\w)'([^']+)'(?!\w)")
|
55
|
-
double_quote_re = re.compile("(?<!\w)''([^']+)''(?!\w)")
|
56
|
-
|
57
|
-
def handle_quotes(s):
|
58
|
-
return re.sub(double_quote_re, '**\g<1>**', re.sub(single_quote_re, '*\g<1>*', s))
|
59
|
-
|
60
|
-
typedef = False
|
61
|
-
mdlines = []
|
62
|
-
chunk = []
|
63
|
-
sig = []
|
64
|
-
|
65
|
-
if len(sys.argv) > 1:
|
66
|
-
sourcefile = sys.argv[1]
|
67
|
-
else:
|
68
|
-
print("Usage: make_man_page.py sourcefile")
|
69
|
-
exit(1)
|
70
|
-
|
71
|
-
with open(sourcefile, 'r') as cmarkh:
|
72
|
-
state = 'default'
|
73
|
-
for line in cmarkh:
|
74
|
-
# state transition
|
75
|
-
oldstate = state
|
76
|
-
if comment_start_re.match(line):
|
77
|
-
state = 'man'
|
78
|
-
elif comment_end_re.match(line) and state == 'man':
|
79
|
-
continue
|
80
|
-
elif comment_delim_re.match(line) and state == 'man':
|
81
|
-
state = 'man'
|
82
|
-
elif not typedef and blank_re.match(line):
|
83
|
-
state = 'default'
|
84
|
-
elif typedef and typedef_end_re.match(line):
|
85
|
-
typedef = False
|
86
|
-
elif typedef_start_re.match(line):
|
87
|
-
typedef = True
|
88
|
-
state = 'signature'
|
89
|
-
elif state == 'man':
|
90
|
-
state = 'signature'
|
91
|
-
|
92
|
-
# handle line
|
93
|
-
if state == 'man':
|
94
|
-
chunk.append(handle_quotes(re.sub(comment_delim_re, '', line)))
|
95
|
-
elif state == 'signature':
|
96
|
-
ln = re.sub(macro_re, '', line)
|
97
|
-
if typedef or not re.match(blank_re, ln):
|
98
|
-
sig.append(ln)
|
99
|
-
elif oldstate == 'signature' and state != 'signature':
|
100
|
-
if len(mdlines) > 0 and mdlines[-1] != '\n':
|
101
|
-
mdlines.append('\n')
|
102
|
-
rawsig = ''.join(sig)
|
103
|
-
m = function_re.match(rawsig)
|
104
|
-
mdlines.append('.PP\n')
|
105
|
-
if m:
|
106
|
-
mdlines.append('\\fI' + m.group('type') + '\\f[]' + ' ')
|
107
|
-
mdlines.append('\\fB' + m.group('name') + '\\f[]' + '(')
|
108
|
-
first = True
|
109
|
-
for argument in re.split(',', m.group('args')):
|
110
|
-
if not first:
|
111
|
-
mdlines.append(', ')
|
112
|
-
first = False
|
113
|
-
mdlines.append('\\fI' + argument.strip() + '\\f[]')
|
114
|
-
mdlines.append(')\n')
|
115
|
-
else:
|
116
|
-
mdlines.append('.nf\n\\fC\n.RS 0n\n')
|
117
|
-
mdlines += sig
|
118
|
-
mdlines.append('.RE\n\\f[]\n.fi\n')
|
119
|
-
if len(mdlines) > 0 and mdlines[-1] != '\n':
|
120
|
-
mdlines.append('\n')
|
121
|
-
mdlines += md2man(''.join(chunk))
|
122
|
-
mdlines.append('\n')
|
123
|
-
chunk = []
|
124
|
-
sig = []
|
125
|
-
elif oldstate == 'man' and state != 'signature':
|
126
|
-
if len(mdlines) > 0 and mdlines[-1] != '\n':
|
127
|
-
mdlines.append('\n')
|
128
|
-
mdlines += md2man(''.join(chunk)) # add man chunk
|
129
|
-
chunk = []
|
130
|
-
mdlines.append('\n')
|
131
|
-
|
132
|
-
sys.stdout.write('.TH cmark-gfm 3 "' + date.today().strftime('%B %d, %Y') + '" "LOCAL" "Library Functions Manual"\n')
|
133
|
-
sys.stdout.write(''.join(mdlines))
|
@@ -1,78 +0,0 @@
|
|
1
|
-
.TH "cmark-gfm" "1" "March 24, 2016" "LOCAL" "General Commands Manual"
|
2
|
-
.SH "NAME"
|
3
|
-
\fBcmark\fR
|
4
|
-
\- convert CommonMark formatted text with GitHub Flavored Markdown extensions to HTML
|
5
|
-
.SH "SYNOPSIS"
|
6
|
-
.HP 6n
|
7
|
-
\fBcmark-gfm\fR
|
8
|
-
[options]
|
9
|
-
file*
|
10
|
-
.SH "DESCRIPTION"
|
11
|
-
\fBcmark-gfm\fR
|
12
|
-
converts Markdown formatted plain text to either HTML, groff man,
|
13
|
-
CommonMark XML, LaTeX, or CommonMark, using the conventions
|
14
|
-
described in the CommonMark spec. It reads input from \fIstdin\fR
|
15
|
-
or the specified files (concatenating their contents) and writes
|
16
|
-
output to \fIstdout\fR.
|
17
|
-
.SH "OPTIONS"
|
18
|
-
.TP 12n
|
19
|
-
.B \-\-to, \-t \f[I]FORMAT\f[]
|
20
|
-
Specify output format (\f[C]html\f[], \f[C]man\f[], \f[C]xml\f[],
|
21
|
-
\f[C]latex\f[], \f[C]commonmark\f[]).
|
22
|
-
.TP 12n
|
23
|
-
.B \-\-width \f[I]WIDTH\f[]
|
24
|
-
Specify a column width to which to wrap the output. For no wrapping, use
|
25
|
-
the value 0 (the default). This option currently only affects the
|
26
|
-
commonmark, latex, and man renderers.
|
27
|
-
.TP 12n
|
28
|
-
.B \-\-hardbreaks
|
29
|
-
Render soft breaks (newlines inside paragraphs in the CommonMark source)
|
30
|
-
as hard line breaks in the target format. If this option is specified,
|
31
|
-
hard wrapping is disabled for CommonMark output, regardless of the value
|
32
|
-
given with \-\-width.
|
33
|
-
.TP 12n
|
34
|
-
.B \-\-nobreaks
|
35
|
-
Render soft breaks as spaces. If this option is specified,
|
36
|
-
hard wrapping is disabled for all output formats, regardless of the value
|
37
|
-
given with \-\-width.
|
38
|
-
.TP 12n
|
39
|
-
.B \-\-sourcepos
|
40
|
-
Include source position attribute.
|
41
|
-
.TP 12n
|
42
|
-
.B \-\-normalize
|
43
|
-
Consolidate adjacent text nodes.
|
44
|
-
.TP 12n
|
45
|
-
.B \-\-extension, \-e \f[I]EXTENSION_NAME\f[]
|
46
|
-
Specify an extension name to use.
|
47
|
-
.TP 12n
|
48
|
-
.B \-\-list\-extensions
|
49
|
-
List available extensions and quit.
|
50
|
-
.TP 12n
|
51
|
-
.B \-\-validate-utf8
|
52
|
-
Validate UTF-8, replacing illegal sequences with U+FFFD.
|
53
|
-
.TP 12n
|
54
|
-
.B \-\-smart
|
55
|
-
Use smart punctuation. Straight double and single quotes will
|
56
|
-
be rendered as curly quotes, depending on their position.
|
57
|
-
\f[C]\-\-\f[] will be rendered as an en-dash.
|
58
|
-
\f[C]\-\-\-\f[] will be rendered as an em-dash.
|
59
|
-
\f[C]...\f[] will be rendered as ellipses.
|
60
|
-
.TP 12n
|
61
|
-
.B \-\-safe
|
62
|
-
Do not render raw HTML or potentially dangerous URLs.
|
63
|
-
(Raw HTML is replaced by a placeholder comment; potentially
|
64
|
-
dangerous URLs are replaced by empty strings.) Dangerous
|
65
|
-
URLs are those that begin with `javascript:`, `vbscript:`,
|
66
|
-
`file:`, or `data:` (except for `image/png`, `image/gif`,
|
67
|
-
`image/jpeg`, or `image/webp` mime types).
|
68
|
-
.TP 12n
|
69
|
-
.B \-\-help
|
70
|
-
Print usage information.
|
71
|
-
.TP 12n
|
72
|
-
.B \-\-version
|
73
|
-
Print version.
|
74
|
-
.SH "AUTHORS"
|
75
|
-
John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer.
|
76
|
-
.SH "SEE ALSO"
|
77
|
-
.PP
|
78
|
-
CommonMark spec: \f[C]http://spec.commonmark.org\f[].
|
@@ -1,989 +0,0 @@
|
|
1
|
-
.TH cmark-gfm 3 "November 09, 2017" "LOCAL" "Library Functions Manual"
|
2
|
-
.SH
|
3
|
-
NAME
|
4
|
-
.PP
|
5
|
-
\f[B]cmark\-gfm\f[] \- CommonMark parsing, manipulating, and rendering
|
6
|
-
|
7
|
-
.SH
|
8
|
-
DESCRIPTION
|
9
|
-
.SS
|
10
|
-
Simple Interface
|
11
|
-
|
12
|
-
.PP
|
13
|
-
\fIchar *\f[] \fBcmark_markdown_to_html\f[](\fIconst char *text\f[], \fIsize_t len\f[], \fIint options\f[])
|
14
|
-
|
15
|
-
.PP
|
16
|
-
Convert \f[I]text\f[] (assumed to be a UTF\-8 encoded string with length
|
17
|
-
\f[I]len\f[]) from CommonMark Markdown to HTML, returning a
|
18
|
-
null\-terminated, UTF\-8\-encoded string. It is the caller's
|
19
|
-
responsibility to free the returned buffer.
|
20
|
-
|
21
|
-
.SS
|
22
|
-
Node Structure
|
23
|
-
|
24
|
-
.PP
|
25
|
-
.nf
|
26
|
-
\fC
|
27
|
-
.RS 0n
|
28
|
-
typedef enum {
|
29
|
-
/* Error status */
|
30
|
-
CMARK_NODE_NONE = 0x0000,
|
31
|
-
|
32
|
-
/* Block */
|
33
|
-
CMARK_NODE_DOCUMENT = CMARK_NODE_TYPE_BLOCK | 0x0001,
|
34
|
-
CMARK_NODE_BLOCK_QUOTE = CMARK_NODE_TYPE_BLOCK | 0x0002,
|
35
|
-
CMARK_NODE_LIST = CMARK_NODE_TYPE_BLOCK | 0x0003,
|
36
|
-
CMARK_NODE_ITEM = CMARK_NODE_TYPE_BLOCK | 0x0004,
|
37
|
-
CMARK_NODE_CODE_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0005,
|
38
|
-
CMARK_NODE_HTML_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0006,
|
39
|
-
CMARK_NODE_CUSTOM_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0007,
|
40
|
-
CMARK_NODE_PARAGRAPH = CMARK_NODE_TYPE_BLOCK | 0x0008,
|
41
|
-
CMARK_NODE_HEADING = CMARK_NODE_TYPE_BLOCK | 0x0009,
|
42
|
-
CMARK_NODE_THEMATIC_BREAK = CMARK_NODE_TYPE_BLOCK | 0x000a,
|
43
|
-
CMARK_NODE_FOOTNOTE_DEFINITION = CMARK_NODE_TYPE_BLOCK | 0x000b,
|
44
|
-
|
45
|
-
/* Inline */
|
46
|
-
CMARK_NODE_TEXT = CMARK_NODE_TYPE_INLINE | 0x0001,
|
47
|
-
CMARK_NODE_SOFTBREAK = CMARK_NODE_TYPE_INLINE | 0x0002,
|
48
|
-
CMARK_NODE_LINEBREAK = CMARK_NODE_TYPE_INLINE | 0x0003,
|
49
|
-
CMARK_NODE_CODE = CMARK_NODE_TYPE_INLINE | 0x0004,
|
50
|
-
CMARK_NODE_HTML_INLINE = CMARK_NODE_TYPE_INLINE | 0x0005,
|
51
|
-
CMARK_NODE_CUSTOM_INLINE = CMARK_NODE_TYPE_INLINE | 0x0006,
|
52
|
-
CMARK_NODE_EMPH = CMARK_NODE_TYPE_INLINE | 0x0007,
|
53
|
-
CMARK_NODE_STRONG = CMARK_NODE_TYPE_INLINE | 0x0008,
|
54
|
-
CMARK_NODE_LINK = CMARK_NODE_TYPE_INLINE | 0x0009,
|
55
|
-
CMARK_NODE_IMAGE = CMARK_NODE_TYPE_INLINE | 0x000a,
|
56
|
-
CMARK_NODE_FOOTNOTE_REFERENCE = CMARK_NODE_TYPE_INLINE | 0x000b,
|
57
|
-
} cmark_node_type;
|
58
|
-
.RE
|
59
|
-
\f[]
|
60
|
-
.fi
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
.PP
|
65
|
-
.nf
|
66
|
-
\fC
|
67
|
-
.RS 0n
|
68
|
-
typedef enum {
|
69
|
-
CMARK_NO_LIST,
|
70
|
-
CMARK_BULLET_LIST,
|
71
|
-
CMARK_ORDERED_LIST
|
72
|
-
} cmark_list_type;
|
73
|
-
.RE
|
74
|
-
\f[]
|
75
|
-
.fi
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
.PP
|
80
|
-
.nf
|
81
|
-
\fC
|
82
|
-
.RS 0n
|
83
|
-
typedef enum {
|
84
|
-
CMARK_NO_DELIM,
|
85
|
-
CMARK_PERIOD_DELIM,
|
86
|
-
CMARK_PAREN_DELIM
|
87
|
-
} cmark_delim_type;
|
88
|
-
.RE
|
89
|
-
\f[]
|
90
|
-
.fi
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
.SS
|
95
|
-
Custom memory allocator support
|
96
|
-
|
97
|
-
.PP
|
98
|
-
.nf
|
99
|
-
\fC
|
100
|
-
.RS 0n
|
101
|
-
typedef struct cmark_mem {
|
102
|
-
void *(*calloc)(size_t, size_t);
|
103
|
-
void *(*realloc)(void *, size_t);
|
104
|
-
void (*free)(void *);
|
105
|
-
} cmark_mem;
|
106
|
-
.RE
|
107
|
-
\f[]
|
108
|
-
.fi
|
109
|
-
|
110
|
-
.PP
|
111
|
-
Defines the memory allocation functions to be used by CMark when parsing
|
112
|
-
and allocating a document tree
|
113
|
-
|
114
|
-
.PP
|
115
|
-
\fIcmark_mem *\f[] \fBcmark_get_default_mem_allocator\f[](\fI\f[])
|
116
|
-
|
117
|
-
.PP
|
118
|
-
The default memory allocator; uses the system's calloc, realloc and
|
119
|
-
free.
|
120
|
-
|
121
|
-
.PP
|
122
|
-
\fIcmark_mem *\f[] \fBcmark_get_arena_mem_allocator\f[](\fI\f[])
|
123
|
-
|
124
|
-
.PP
|
125
|
-
An arena allocator; uses system calloc to allocate large slabs of
|
126
|
-
memory. Memory in these slabs is not reused at all.
|
127
|
-
|
128
|
-
.PP
|
129
|
-
\fIvoid\f[] \fBcmark_arena_reset\f[](\fIvoid\f[])
|
130
|
-
|
131
|
-
.PP
|
132
|
-
Resets the arena allocator, quickly returning all used memory to the
|
133
|
-
operating system.
|
134
|
-
|
135
|
-
.PP
|
136
|
-
\fItypedef\f[] \fBvoid\f[](\fI*cmark_free_func\f[])
|
137
|
-
|
138
|
-
.PP
|
139
|
-
Callback for freeing user data with a \f[I]cmark_mem\f[] context.
|
140
|
-
|
141
|
-
.SS
|
142
|
-
Linked list
|
143
|
-
|
144
|
-
.PP
|
145
|
-
.nf
|
146
|
-
\fC
|
147
|
-
.RS 0n
|
148
|
-
typedef struct _cmark_llist
|
149
|
-
{
|
150
|
-
struct _cmark_llist *next;
|
151
|
-
void *data;
|
152
|
-
} cmark_llist;
|
153
|
-
.RE
|
154
|
-
\f[]
|
155
|
-
.fi
|
156
|
-
|
157
|
-
.PP
|
158
|
-
A generic singly linked list.
|
159
|
-
|
160
|
-
.PP
|
161
|
-
\fIcmark_llist *\f[] \fBcmark_llist_append\f[](\fIcmark_mem * mem\f[], \fIcmark_llist * head\f[], \fIvoid * data\f[])
|
162
|
-
|
163
|
-
.PP
|
164
|
-
Append an element to the linked list, return the possibly modified head
|
165
|
-
of the list.
|
166
|
-
|
167
|
-
.PP
|
168
|
-
\fIvoid\f[] \fBcmark_llist_free_full\f[](\fIcmark_mem * mem\f[], \fIcmark_llist * head\f[], \fIcmark_free_func free_func\f[])
|
169
|
-
|
170
|
-
.PP
|
171
|
-
Free the list starting with \f[I]head\f[], calling \f[I]free_func\f[]
|
172
|
-
with the data pointer of each of its elements
|
173
|
-
|
174
|
-
.PP
|
175
|
-
\fIvoid\f[] \fBcmark_llist_free\f[](\fIcmark_mem * mem\f[], \fIcmark_llist * head\f[])
|
176
|
-
|
177
|
-
.PP
|
178
|
-
Free the list starting with \f[I]head\f[]
|
179
|
-
|
180
|
-
.SS
|
181
|
-
Creating and Destroying Nodes
|
182
|
-
|
183
|
-
.PP
|
184
|
-
\fIcmark_node *\f[] \fBcmark_node_new\f[](\fIcmark_node_type type\f[])
|
185
|
-
|
186
|
-
.PP
|
187
|
-
Creates a new node of type \f[I]type\f[]. Note that the node may have
|
188
|
-
other required properties, which it is the caller's responsibility to
|
189
|
-
assign.
|
190
|
-
|
191
|
-
.PP
|
192
|
-
\fIcmark_node *\f[] \fBcmark_node_new_with_mem\f[](\fIcmark_node_type type\f[], \fIcmark_mem *mem\f[])
|
193
|
-
|
194
|
-
.PP
|
195
|
-
Same as \f[C]cmark_node_new\f[], but explicitly listing the memory
|
196
|
-
allocator used to allocate the node. Note: be sure to use the same
|
197
|
-
allocator for every node in a tree, or bad things can happen.
|
198
|
-
|
199
|
-
.PP
|
200
|
-
\fIvoid\f[] \fBcmark_node_free\f[](\fIcmark_node *node\f[])
|
201
|
-
|
202
|
-
.PP
|
203
|
-
Frees the memory allocated for a node and any children.
|
204
|
-
|
205
|
-
.SS
|
206
|
-
Tree Traversal
|
207
|
-
|
208
|
-
.PP
|
209
|
-
\fIcmark_node *\f[] \fBcmark_node_next\f[](\fIcmark_node *node\f[])
|
210
|
-
|
211
|
-
.PP
|
212
|
-
Returns the next node in the sequence after \f[I]node\f[], or NULL if
|
213
|
-
there is none.
|
214
|
-
|
215
|
-
.PP
|
216
|
-
\fIcmark_node *\f[] \fBcmark_node_previous\f[](\fIcmark_node *node\f[])
|
217
|
-
|
218
|
-
.PP
|
219
|
-
Returns the previous node in the sequence after \f[I]node\f[], or NULL
|
220
|
-
if there is none.
|
221
|
-
|
222
|
-
.PP
|
223
|
-
\fIcmark_node *\f[] \fBcmark_node_parent\f[](\fIcmark_node *node\f[])
|
224
|
-
|
225
|
-
.PP
|
226
|
-
Returns the parent of \f[I]node\f[], or NULL if there is none.
|
227
|
-
|
228
|
-
.PP
|
229
|
-
\fIcmark_node *\f[] \fBcmark_node_first_child\f[](\fIcmark_node *node\f[])
|
230
|
-
|
231
|
-
.PP
|
232
|
-
Returns the first child of \f[I]node\f[], or NULL if \f[I]node\f[] has
|
233
|
-
no children.
|
234
|
-
|
235
|
-
.PP
|
236
|
-
\fIcmark_node *\f[] \fBcmark_node_last_child\f[](\fIcmark_node *node\f[])
|
237
|
-
|
238
|
-
.PP
|
239
|
-
Returns the last child of \f[I]node\f[], or NULL if \f[I]node\f[] has no
|
240
|
-
children.
|
241
|
-
|
242
|
-
.SS
|
243
|
-
Iterator
|
244
|
-
.PP
|
245
|
-
An iterator will walk through a tree of nodes, starting from a root
|
246
|
-
node, returning one node at a time, together with information about
|
247
|
-
whether the node is being entered or exited. The iterator will first
|
248
|
-
descend to a child node, if there is one. When there is no child, the
|
249
|
-
iterator will go to the next sibling. When there is no next sibling, the
|
250
|
-
iterator will return to the parent (but with a \f[I]cmark_event_type\f[]
|
251
|
-
of \f[C]CMARK_EVENT_EXIT\f[]). The iterator will return
|
252
|
-
\f[C]CMARK_EVENT_DONE\f[] when it reaches the root node again. One
|
253
|
-
natural application is an HTML renderer, where an \f[C]ENTER\f[] event
|
254
|
-
outputs an open tag and an \f[C]EXIT\f[] event outputs a close tag. An
|
255
|
-
iterator might also be used to transform an AST in some systematic way,
|
256
|
-
for example, turning all level\-3 headings into regular paragraphs.
|
257
|
-
.IP
|
258
|
-
.nf
|
259
|
-
\f[C]
|
260
|
-
void
|
261
|
-
usage_example(cmark_node *root) {
|
262
|
-
cmark_event_type ev_type;
|
263
|
-
cmark_iter *iter = cmark_iter_new(root);
|
264
|
-
|
265
|
-
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
|
266
|
-
cmark_node *cur = cmark_iter_get_node(iter);
|
267
|
-
// Do something with `cur` and `ev_type`
|
268
|
-
}
|
269
|
-
|
270
|
-
cmark_iter_free(iter);
|
271
|
-
}
|
272
|
-
\f[]
|
273
|
-
.fi
|
274
|
-
.PP
|
275
|
-
Iterators will never return \f[C]EXIT\f[] events for leaf nodes, which
|
276
|
-
are nodes of type:
|
277
|
-
.IP \[bu] 2
|
278
|
-
CMARK_NODE_HTML_BLOCK
|
279
|
-
.IP \[bu] 2
|
280
|
-
CMARK_NODE_THEMATIC_BREAK
|
281
|
-
.IP \[bu] 2
|
282
|
-
CMARK_NODE_CODE_BLOCK
|
283
|
-
.IP \[bu] 2
|
284
|
-
CMARK_NODE_TEXT
|
285
|
-
.IP \[bu] 2
|
286
|
-
CMARK_NODE_SOFTBREAK
|
287
|
-
.IP \[bu] 2
|
288
|
-
CMARK_NODE_LINEBREAK
|
289
|
-
.IP \[bu] 2
|
290
|
-
CMARK_NODE_CODE
|
291
|
-
.IP \[bu] 2
|
292
|
-
CMARK_NODE_HTML_INLINE
|
293
|
-
.PP
|
294
|
-
Nodes must only be modified after an \f[C]EXIT\f[] event, or an
|
295
|
-
\f[C]ENTER\f[] event for leaf nodes.
|
296
|
-
|
297
|
-
.PP
|
298
|
-
.nf
|
299
|
-
\fC
|
300
|
-
.RS 0n
|
301
|
-
typedef enum {
|
302
|
-
CMARK_EVENT_NONE,
|
303
|
-
CMARK_EVENT_DONE,
|
304
|
-
CMARK_EVENT_ENTER,
|
305
|
-
CMARK_EVENT_EXIT
|
306
|
-
} cmark_event_type;
|
307
|
-
.RE
|
308
|
-
\f[]
|
309
|
-
.fi
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
.PP
|
314
|
-
\fIcmark_iter *\f[] \fBcmark_iter_new\f[](\fIcmark_node *root\f[])
|
315
|
-
|
316
|
-
.PP
|
317
|
-
Creates a new iterator starting at \f[I]root\f[]. The current node and
|
318
|
-
event type are undefined until \f[I]cmark_iter_next\f[] is called for
|
319
|
-
the first time. The memory allocated for the iterator should be released
|
320
|
-
using \f[I]cmark_iter_free\f[] when it is no longer needed.
|
321
|
-
|
322
|
-
.PP
|
323
|
-
\fIvoid\f[] \fBcmark_iter_free\f[](\fIcmark_iter *iter\f[])
|
324
|
-
|
325
|
-
.PP
|
326
|
-
Frees the memory allocated for an iterator.
|
327
|
-
|
328
|
-
.PP
|
329
|
-
\fIcmark_event_type\f[] \fBcmark_iter_next\f[](\fIcmark_iter *iter\f[])
|
330
|
-
|
331
|
-
.PP
|
332
|
-
Advances to the next node and returns the event type
|
333
|
-
(\f[C]CMARK_EVENT_ENTER\f[], \f[C]CMARK_EVENT_EXIT\f[] or
|
334
|
-
\f[C]CMARK_EVENT_DONE\f[]).
|
335
|
-
|
336
|
-
.PP
|
337
|
-
\fIcmark_node *\f[] \fBcmark_iter_get_node\f[](\fIcmark_iter *iter\f[])
|
338
|
-
|
339
|
-
.PP
|
340
|
-
Returns the current node.
|
341
|
-
|
342
|
-
.PP
|
343
|
-
\fIcmark_event_type\f[] \fBcmark_iter_get_event_type\f[](\fIcmark_iter *iter\f[])
|
344
|
-
|
345
|
-
.PP
|
346
|
-
Returns the current event type.
|
347
|
-
|
348
|
-
.PP
|
349
|
-
\fIcmark_node *\f[] \fBcmark_iter_get_root\f[](\fIcmark_iter *iter\f[])
|
350
|
-
|
351
|
-
.PP
|
352
|
-
Returns the root node.
|
353
|
-
|
354
|
-
.PP
|
355
|
-
\fIvoid\f[] \fBcmark_iter_reset\f[](\fIcmark_iter *iter\f[], \fIcmark_node *current\f[], \fIcmark_event_type event_type\f[])
|
356
|
-
|
357
|
-
.PP
|
358
|
-
Resets the iterator so that the current node is \f[I]current\f[] and the
|
359
|
-
event type is \f[I]event_type\f[]. The new current node must be a
|
360
|
-
descendant of the root node or the root node itself.
|
361
|
-
|
362
|
-
.SS
|
363
|
-
Accessors
|
364
|
-
|
365
|
-
.PP
|
366
|
-
\fIvoid *\f[] \fBcmark_node_get_user_data\f[](\fIcmark_node *node\f[])
|
367
|
-
|
368
|
-
.PP
|
369
|
-
Returns the user data of \f[I]node\f[].
|
370
|
-
|
371
|
-
.PP
|
372
|
-
\fIint\f[] \fBcmark_node_set_user_data\f[](\fIcmark_node *node\f[], \fIvoid *user_data\f[])
|
373
|
-
|
374
|
-
.PP
|
375
|
-
Sets arbitrary user data for \f[I]node\f[]. Returns 1 on success, 0 on
|
376
|
-
failure.
|
377
|
-
|
378
|
-
.PP
|
379
|
-
\fIint\f[] \fBcmark_node_set_user_data_free_func\f[](\fIcmark_node *node\f[], \fIcmark_free_func free_func\f[])
|
380
|
-
|
381
|
-
.PP
|
382
|
-
Set free function for user data */
|
383
|
-
|
384
|
-
.PP
|
385
|
-
\fIcmark_node_type\f[] \fBcmark_node_get_type\f[](\fIcmark_node *node\f[])
|
386
|
-
|
387
|
-
.PP
|
388
|
-
Returns the type of \f[I]node\f[], or \f[C]CMARK_NODE_NONE\f[] on error.
|
389
|
-
|
390
|
-
.PP
|
391
|
-
\fIconst char *\f[] \fBcmark_node_get_type_string\f[](\fIcmark_node *node\f[])
|
392
|
-
|
393
|
-
.PP
|
394
|
-
Like \f[I]cmark_node_get_type\f[], but returns a string representation
|
395
|
-
of the type, or \f[C]"<unknown>"\f[].
|
396
|
-
|
397
|
-
.PP
|
398
|
-
\fIconst char *\f[] \fBcmark_node_get_literal\f[](\fIcmark_node *node\f[])
|
399
|
-
|
400
|
-
.PP
|
401
|
-
Returns the string contents of \f[I]node\f[], or an empty string if none
|
402
|
-
is set. Returns NULL if called on a node that does not have string
|
403
|
-
content.
|
404
|
-
|
405
|
-
.PP
|
406
|
-
\fIint\f[] \fBcmark_node_set_literal\f[](\fIcmark_node *node\f[], \fIconst char *content\f[])
|
407
|
-
|
408
|
-
.PP
|
409
|
-
Sets the string contents of \f[I]node\f[]. Returns 1 on success, 0 on
|
410
|
-
failure.
|
411
|
-
|
412
|
-
.PP
|
413
|
-
\fIint\f[] \fBcmark_node_get_heading_level\f[](\fIcmark_node *node\f[])
|
414
|
-
|
415
|
-
.PP
|
416
|
-
Returns the heading level of \f[I]node\f[], or 0 if \f[I]node\f[] is not
|
417
|
-
a heading.
|
418
|
-
|
419
|
-
.PP
|
420
|
-
\fIint\f[] \fBcmark_node_set_heading_level\f[](\fIcmark_node *node\f[], \fIint level\f[])
|
421
|
-
|
422
|
-
.PP
|
423
|
-
Sets the heading level of \f[I]node\f[], returning 1 on success and 0 on
|
424
|
-
error.
|
425
|
-
|
426
|
-
.PP
|
427
|
-
\fIcmark_list_type\f[] \fBcmark_node_get_list_type\f[](\fIcmark_node *node\f[])
|
428
|
-
|
429
|
-
.PP
|
430
|
-
Returns the list type of \f[I]node\f[], or \f[C]CMARK_NO_LIST\f[] if
|
431
|
-
\f[I]node\f[] is not a list.
|
432
|
-
|
433
|
-
.PP
|
434
|
-
\fIint\f[] \fBcmark_node_set_list_type\f[](\fIcmark_node *node\f[], \fIcmark_list_type type\f[])
|
435
|
-
|
436
|
-
.PP
|
437
|
-
Sets the list type of \f[I]node\f[], returning 1 on success and 0 on
|
438
|
-
error.
|
439
|
-
|
440
|
-
.PP
|
441
|
-
\fIcmark_delim_type\f[] \fBcmark_node_get_list_delim\f[](\fIcmark_node *node\f[])
|
442
|
-
|
443
|
-
.PP
|
444
|
-
Returns the list delimiter type of \f[I]node\f[], or
|
445
|
-
\f[C]CMARK_NO_DELIM\f[] if \f[I]node\f[] is not a list.
|
446
|
-
|
447
|
-
.PP
|
448
|
-
\fIint\f[] \fBcmark_node_set_list_delim\f[](\fIcmark_node *node\f[], \fIcmark_delim_type delim\f[])
|
449
|
-
|
450
|
-
.PP
|
451
|
-
Sets the list delimiter type of \f[I]node\f[], returning 1 on success
|
452
|
-
and 0 on error.
|
453
|
-
|
454
|
-
.PP
|
455
|
-
\fIint\f[] \fBcmark_node_get_list_start\f[](\fIcmark_node *node\f[])
|
456
|
-
|
457
|
-
.PP
|
458
|
-
Returns starting number of \f[I]node\f[], if it is an ordered list,
|
459
|
-
otherwise 0.
|
460
|
-
|
461
|
-
.PP
|
462
|
-
\fIint\f[] \fBcmark_node_set_list_start\f[](\fIcmark_node *node\f[], \fIint start\f[])
|
463
|
-
|
464
|
-
.PP
|
465
|
-
Sets starting number of \f[I]node\f[], if it is an ordered list.
|
466
|
-
Returns 1 on success, 0 on failure.
|
467
|
-
|
468
|
-
.PP
|
469
|
-
\fIint\f[] \fBcmark_node_get_list_tight\f[](\fIcmark_node *node\f[])
|
470
|
-
|
471
|
-
.PP
|
472
|
-
Returns 1 if \f[I]node\f[] is a tight list, 0 otherwise.
|
473
|
-
|
474
|
-
.PP
|
475
|
-
\fIint\f[] \fBcmark_node_set_list_tight\f[](\fIcmark_node *node\f[], \fIint tight\f[])
|
476
|
-
|
477
|
-
.PP
|
478
|
-
Sets the "tightness" of a list. Returns 1 on success, 0 on failure.
|
479
|
-
|
480
|
-
.PP
|
481
|
-
\fIconst char *\f[] \fBcmark_node_get_fence_info\f[](\fIcmark_node *node\f[])
|
482
|
-
|
483
|
-
.PP
|
484
|
-
Returns the info string from a fenced code block.
|
485
|
-
|
486
|
-
.PP
|
487
|
-
\fIint\f[] \fBcmark_node_set_fence_info\f[](\fIcmark_node *node\f[], \fIconst char *info\f[])
|
488
|
-
|
489
|
-
.PP
|
490
|
-
Sets the info string in a fenced code block, returning 1 on success
|
491
|
-
and 0 on failure.
|
492
|
-
|
493
|
-
.PP
|
494
|
-
\fIint\f[] \fBcmark_node_set_fenced\f[](\fIcmark_node * node\f[], \fIint fenced\f[], \fIint length\f[], \fIint offset\f[], \fIchar character\f[])
|
495
|
-
|
496
|
-
.PP
|
497
|
-
Sets code blocks fencing details
|
498
|
-
|
499
|
-
.PP
|
500
|
-
\fIint\f[] \fBcmark_node_get_fenced\f[](\fIcmark_node *node\f[], \fIint *length\f[], \fIint *offset\f[], \fIchar *character\f[])
|
501
|
-
|
502
|
-
.PP
|
503
|
-
Returns code blocks fencing details
|
504
|
-
|
505
|
-
.PP
|
506
|
-
\fIconst char *\f[] \fBcmark_node_get_url\f[](\fIcmark_node *node\f[])
|
507
|
-
|
508
|
-
.PP
|
509
|
-
Returns the URL of a link or image \f[I]node\f[], or an empty string if
|
510
|
-
no URL is set. Returns NULL if called on a node that is not a link or
|
511
|
-
image.
|
512
|
-
|
513
|
-
.PP
|
514
|
-
\fIint\f[] \fBcmark_node_set_url\f[](\fIcmark_node *node\f[], \fIconst char *url\f[])
|
515
|
-
|
516
|
-
.PP
|
517
|
-
Sets the URL of a link or image \f[I]node\f[]. Returns 1 on success, 0
|
518
|
-
on failure.
|
519
|
-
|
520
|
-
.PP
|
521
|
-
\fIconst char *\f[] \fBcmark_node_get_title\f[](\fIcmark_node *node\f[])
|
522
|
-
|
523
|
-
.PP
|
524
|
-
Returns the title of a link or image \f[I]node\f[], or an empty string
|
525
|
-
if no title is set. Returns NULL if called on a node that is not a link
|
526
|
-
or image.
|
527
|
-
|
528
|
-
.PP
|
529
|
-
\fIint\f[] \fBcmark_node_set_title\f[](\fIcmark_node *node\f[], \fIconst char *title\f[])
|
530
|
-
|
531
|
-
.PP
|
532
|
-
Sets the title of a link or image \f[I]node\f[]. Returns 1 on success, 0
|
533
|
-
on failure.
|
534
|
-
|
535
|
-
.PP
|
536
|
-
\fIconst char *\f[] \fBcmark_node_get_on_enter\f[](\fIcmark_node *node\f[])
|
537
|
-
|
538
|
-
.PP
|
539
|
-
Returns the literal "on enter" text for a custom \f[I]node\f[], or an
|
540
|
-
empty string if no on_enter is set. Returns NULL if called on a
|
541
|
-
non\-custom node.
|
542
|
-
|
543
|
-
.PP
|
544
|
-
\fIint\f[] \fBcmark_node_set_on_enter\f[](\fIcmark_node *node\f[], \fIconst char *on_enter\f[])
|
545
|
-
|
546
|
-
.PP
|
547
|
-
Sets the literal text to render "on enter" for a custom \f[I]node\f[].
|
548
|
-
Any children of the node will be rendered after this text. Returns 1 on
|
549
|
-
success 0 on failure.
|
550
|
-
|
551
|
-
.PP
|
552
|
-
\fIconst char *\f[] \fBcmark_node_get_on_exit\f[](\fIcmark_node *node\f[])
|
553
|
-
|
554
|
-
.PP
|
555
|
-
Returns the literal "on exit" text for a custom \f[I]node\f[], or an
|
556
|
-
empty string if no on_exit is set. Returns NULL if called on a
|
557
|
-
non\-custom node.
|
558
|
-
|
559
|
-
.PP
|
560
|
-
\fIint\f[] \fBcmark_node_set_on_exit\f[](\fIcmark_node *node\f[], \fIconst char *on_exit\f[])
|
561
|
-
|
562
|
-
.PP
|
563
|
-
Sets the literal text to render "on exit" for a custom \f[I]node\f[].
|
564
|
-
Any children of the node will be rendered before this text. Returns 1 on
|
565
|
-
success 0 on failure.
|
566
|
-
|
567
|
-
.PP
|
568
|
-
\fIint\f[] \fBcmark_node_get_start_line\f[](\fIcmark_node *node\f[])
|
569
|
-
|
570
|
-
.PP
|
571
|
-
Returns the line on which \f[I]node\f[] begins.
|
572
|
-
|
573
|
-
.PP
|
574
|
-
\fIint\f[] \fBcmark_node_get_start_column\f[](\fIcmark_node *node\f[])
|
575
|
-
|
576
|
-
.PP
|
577
|
-
Returns the column at which \f[I]node\f[] begins.
|
578
|
-
|
579
|
-
.PP
|
580
|
-
\fIint\f[] \fBcmark_node_get_end_line\f[](\fIcmark_node *node\f[])
|
581
|
-
|
582
|
-
.PP
|
583
|
-
Returns the line on which \f[I]node\f[] ends.
|
584
|
-
|
585
|
-
.PP
|
586
|
-
\fIint\f[] \fBcmark_node_get_end_column\f[](\fIcmark_node *node\f[])
|
587
|
-
|
588
|
-
.PP
|
589
|
-
Returns the column at which \f[I]node\f[] ends.
|
590
|
-
|
591
|
-
.SS
|
592
|
-
Tree Manipulation
|
593
|
-
|
594
|
-
.PP
|
595
|
-
\fIvoid\f[] \fBcmark_node_unlink\f[](\fIcmark_node *node\f[])
|
596
|
-
|
597
|
-
.PP
|
598
|
-
Unlinks a \f[I]node\f[], removing it from the tree, but not freeing its
|
599
|
-
memory. (Use \f[I]cmark_node_free\f[] for that.)
|
600
|
-
|
601
|
-
.PP
|
602
|
-
\fIint\f[] \fBcmark_node_insert_before\f[](\fIcmark_node *node\f[], \fIcmark_node *sibling\f[])
|
603
|
-
|
604
|
-
.PP
|
605
|
-
Inserts \f[I]sibling\f[] before \f[I]node\f[]. Returns 1 on success, 0
|
606
|
-
on failure.
|
607
|
-
|
608
|
-
.PP
|
609
|
-
\fIint\f[] \fBcmark_node_insert_after\f[](\fIcmark_node *node\f[], \fIcmark_node *sibling\f[])
|
610
|
-
|
611
|
-
.PP
|
612
|
-
Inserts \f[I]sibling\f[] after \f[I]node\f[]. Returns 1 on success, 0 on
|
613
|
-
failure.
|
614
|
-
|
615
|
-
.PP
|
616
|
-
\fIint\f[] \fBcmark_node_replace\f[](\fIcmark_node *oldnode\f[], \fIcmark_node *newnode\f[])
|
617
|
-
|
618
|
-
.PP
|
619
|
-
Replaces \f[I]oldnode\f[] with \f[I]newnode\f[] and unlinks
|
620
|
-
\f[I]oldnode\f[] (but does not free its memory). Returns 1 on success, 0
|
621
|
-
on failure.
|
622
|
-
|
623
|
-
.PP
|
624
|
-
\fIint\f[] \fBcmark_node_prepend_child\f[](\fIcmark_node *node\f[], \fIcmark_node *child\f[])
|
625
|
-
|
626
|
-
.PP
|
627
|
-
Adds \f[I]child\f[] to the beginning of the children of \f[I]node\f[].
|
628
|
-
Returns 1 on success, 0 on failure.
|
629
|
-
|
630
|
-
.PP
|
631
|
-
\fIint\f[] \fBcmark_node_append_child\f[](\fIcmark_node *node\f[], \fIcmark_node *child\f[])
|
632
|
-
|
633
|
-
.PP
|
634
|
-
Adds \f[I]child\f[] to the end of the children of \f[I]node\f[].
|
635
|
-
Returns 1 on success, 0 on failure.
|
636
|
-
|
637
|
-
.PP
|
638
|
-
\fIvoid\f[] \fBcmark_consolidate_text_nodes\f[](\fIcmark_node *root\f[])
|
639
|
-
|
640
|
-
.PP
|
641
|
-
Consolidates adjacent text nodes.
|
642
|
-
|
643
|
-
.PP
|
644
|
-
\fIvoid\f[] \fBcmark_node_own\f[](\fIcmark_node *root\f[])
|
645
|
-
|
646
|
-
.PP
|
647
|
-
Ensures a node and all its children own their own chunk memory.
|
648
|
-
|
649
|
-
.SS
|
650
|
-
Parsing
|
651
|
-
.PP
|
652
|
-
Simple interface:
|
653
|
-
.IP
|
654
|
-
.nf
|
655
|
-
\f[C]
|
656
|
-
cmark_node *document = cmark_parse_document("Hello *world*", 13,
|
657
|
-
CMARK_OPT_DEFAULT);
|
658
|
-
\f[]
|
659
|
-
.fi
|
660
|
-
.PP
|
661
|
-
Streaming interface:
|
662
|
-
.IP
|
663
|
-
.nf
|
664
|
-
\f[C]
|
665
|
-
cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT);
|
666
|
-
FILE *fp = fopen("myfile.md", "rb");
|
667
|
-
while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
|
668
|
-
cmark_parser_feed(parser, buffer, bytes);
|
669
|
-
if (bytes < sizeof(buffer)) {
|
670
|
-
break;
|
671
|
-
}
|
672
|
-
}
|
673
|
-
document = cmark_parser_finish(parser);
|
674
|
-
cmark_parser_free(parser);
|
675
|
-
\f[]
|
676
|
-
.fi
|
677
|
-
|
678
|
-
.PP
|
679
|
-
\fIcmark_parser *\f[] \fBcmark_parser_new\f[](\fIint options\f[])
|
680
|
-
|
681
|
-
.PP
|
682
|
-
Creates a new parser object.
|
683
|
-
|
684
|
-
.PP
|
685
|
-
\fIcmark_parser *\f[] \fBcmark_parser_new_with_mem\f[](\fIint options\f[], \fIcmark_mem *mem\f[])
|
686
|
-
|
687
|
-
.PP
|
688
|
-
Creates a new parser object with the given memory allocator
|
689
|
-
|
690
|
-
.PP
|
691
|
-
\fIvoid\f[] \fBcmark_parser_free\f[](\fIcmark_parser *parser\f[])
|
692
|
-
|
693
|
-
.PP
|
694
|
-
Frees memory allocated for a parser object.
|
695
|
-
|
696
|
-
.PP
|
697
|
-
\fIvoid\f[] \fBcmark_parser_feed\f[](\fIcmark_parser *parser\f[], \fIconst char *buffer\f[], \fIsize_t len\f[])
|
698
|
-
|
699
|
-
.PP
|
700
|
-
Feeds a string of length \f[I]len\f[] to \f[I]parser\f[].
|
701
|
-
|
702
|
-
.PP
|
703
|
-
\fIcmark_node *\f[] \fBcmark_parser_finish\f[](\fIcmark_parser *parser\f[])
|
704
|
-
|
705
|
-
.PP
|
706
|
-
Finish parsing and return a pointer to a tree of nodes.
|
707
|
-
|
708
|
-
.PP
|
709
|
-
\fIcmark_node *\f[] \fBcmark_parse_document\f[](\fIconst char *buffer\f[], \fIsize_t len\f[], \fIint options\f[])
|
710
|
-
|
711
|
-
.PP
|
712
|
-
Parse a CommonMark document in \f[I]buffer\f[] of length \f[I]len\f[].
|
713
|
-
Returns a pointer to a tree of nodes. The memory allocated for the node
|
714
|
-
tree should be released using \f[I]cmark_node_free\f[] when it is no
|
715
|
-
longer needed.
|
716
|
-
|
717
|
-
.PP
|
718
|
-
\fIcmark_node *\f[] \fBcmark_parse_file\f[](\fIFILE *f\f[], \fIint options\f[])
|
719
|
-
|
720
|
-
.PP
|
721
|
-
Parse a CommonMark document in file \f[I]f\f[], returning a pointer to a
|
722
|
-
tree of nodes. The memory allocated for the node tree should be released
|
723
|
-
using \f[I]cmark_node_free\f[] when it is no longer needed.
|
724
|
-
|
725
|
-
.SS
|
726
|
-
Rendering
|
727
|
-
|
728
|
-
.PP
|
729
|
-
\fIchar *\f[] \fBcmark_render_xml\f[](\fIcmark_node *root\f[], \fIint options\f[])
|
730
|
-
|
731
|
-
.PP
|
732
|
-
Render a \f[I]node\f[] tree as XML. It is the caller's responsibility to
|
733
|
-
free the returned buffer.
|
734
|
-
|
735
|
-
.PP
|
736
|
-
\fIchar *\f[] \fBcmark_render_xml_with_mem\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIcmark_mem *mem\f[])
|
737
|
-
|
738
|
-
.PP
|
739
|
-
As for \f[I]cmark_render_xml\f[], but specifying the allocator to use
|
740
|
-
for the resulting string.
|
741
|
-
|
742
|
-
.PP
|
743
|
-
\fIchar *\f[] \fBcmark_render_html\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIcmark_llist *extensions\f[])
|
744
|
-
|
745
|
-
.PP
|
746
|
-
Render a \f[I]node\f[] tree as an HTML fragment. It is up to the user to
|
747
|
-
add an appropriate header and footer. It is the caller's responsibility
|
748
|
-
to free the returned buffer.
|
749
|
-
|
750
|
-
.PP
|
751
|
-
\fIchar *\f[] \fBcmark_render_html_with_mem\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIcmark_llist *extensions\f[], \fIcmark_mem *mem\f[])
|
752
|
-
|
753
|
-
.PP
|
754
|
-
As for \f[I]cmark_render_html\f[], but specifying the allocator to use
|
755
|
-
for the resulting string.
|
756
|
-
|
757
|
-
.PP
|
758
|
-
\fIchar *\f[] \fBcmark_render_man\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIint width\f[])
|
759
|
-
|
760
|
-
.PP
|
761
|
-
Render a \f[I]node\f[] tree as a groff man page, without the header. It
|
762
|
-
is the caller's responsibility to free the returned buffer.
|
763
|
-
|
764
|
-
.PP
|
765
|
-
\fIchar *\f[] \fBcmark_render_man_with_mem\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIint width\f[], \fIcmark_mem *mem\f[])
|
766
|
-
|
767
|
-
.PP
|
768
|
-
As for \f[I]cmark_render_man\f[], but specifying the allocator to use
|
769
|
-
for the resulting string.
|
770
|
-
|
771
|
-
.PP
|
772
|
-
\fIchar *\f[] \fBcmark_render_commonmark\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIint width\f[])
|
773
|
-
|
774
|
-
.PP
|
775
|
-
Render a \f[I]node\f[] tree as a commonmark document. It is the caller's
|
776
|
-
responsibility to free the returned buffer.
|
777
|
-
|
778
|
-
.PP
|
779
|
-
\fIchar *\f[] \fBcmark_render_commonmark_with_mem\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIint width\f[], \fIcmark_mem *mem\f[])
|
780
|
-
|
781
|
-
.PP
|
782
|
-
As for \f[I]cmark_render_commonmark\f[], but specifying the allocator to
|
783
|
-
use for the resulting string.
|
784
|
-
|
785
|
-
.PP
|
786
|
-
\fIchar *\f[] \fBcmark_render_plaintext\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIint width\f[])
|
787
|
-
|
788
|
-
.PP
|
789
|
-
Render a \f[I]node\f[] tree as a plain text document. It is the caller's
|
790
|
-
responsibility to free the returned buffer.
|
791
|
-
|
792
|
-
.PP
|
793
|
-
\fIchar *\f[] \fBcmark_render_plaintext_with_mem\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIint width\f[], \fIcmark_mem *mem\f[])
|
794
|
-
|
795
|
-
.PP
|
796
|
-
As for \f[I]cmark_render_plaintext\f[], but specifying the allocator to
|
797
|
-
use for the resulting string.
|
798
|
-
|
799
|
-
.PP
|
800
|
-
\fIchar *\f[] \fBcmark_render_latex\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIint width\f[])
|
801
|
-
|
802
|
-
.PP
|
803
|
-
Render a \f[I]node\f[] tree as a LaTeX document. It is the caller's
|
804
|
-
responsibility to free the returned buffer.
|
805
|
-
|
806
|
-
.PP
|
807
|
-
\fIchar *\f[] \fBcmark_render_latex_with_mem\f[](\fIcmark_node *root\f[], \fIint options\f[], \fIint width\f[], \fIcmark_mem *mem\f[])
|
808
|
-
|
809
|
-
.PP
|
810
|
-
As for \f[I]cmark_render_latex\f[], but specifying the allocator to use
|
811
|
-
for the resulting string.
|
812
|
-
|
813
|
-
.SS
|
814
|
-
Options
|
815
|
-
|
816
|
-
.PP
|
817
|
-
.nf
|
818
|
-
\fC
|
819
|
-
.RS 0n
|
820
|
-
#define CMARK_OPT_DEFAULT 0
|
821
|
-
.RE
|
822
|
-
\f[]
|
823
|
-
.fi
|
824
|
-
|
825
|
-
.PP
|
826
|
-
Default options.
|
827
|
-
|
828
|
-
.SS
|
829
|
-
Options affecting rendering
|
830
|
-
|
831
|
-
.PP
|
832
|
-
.nf
|
833
|
-
\fC
|
834
|
-
.RS 0n
|
835
|
-
#define CMARK_OPT_SOURCEPOS (1 << 1)
|
836
|
-
.RE
|
837
|
-
\f[]
|
838
|
-
.fi
|
839
|
-
|
840
|
-
.PP
|
841
|
-
Include a \f[C]data\-sourcepos\f[] attribute on all block elements.
|
842
|
-
|
843
|
-
.PP
|
844
|
-
.nf
|
845
|
-
\fC
|
846
|
-
.RS 0n
|
847
|
-
#define CMARK_OPT_HARDBREAKS (1 << 2)
|
848
|
-
.RE
|
849
|
-
\f[]
|
850
|
-
.fi
|
851
|
-
|
852
|
-
.PP
|
853
|
-
Render \f[C]softbreak\f[] elements as hard line breaks.
|
854
|
-
|
855
|
-
.PP
|
856
|
-
.nf
|
857
|
-
\fC
|
858
|
-
.RS 0n
|
859
|
-
#define CMARK_OPT_SAFE (1 << 3)
|
860
|
-
.RE
|
861
|
-
\f[]
|
862
|
-
.fi
|
863
|
-
|
864
|
-
.PP
|
865
|
-
Suppress raw HTML and unsafe links (\f[C]javascript:\f[],
|
866
|
-
\f[C]vbscript:\f[], \f[C]file:\f[], and \f[C]data:\f[], except for
|
867
|
-
\f[C]image/png\f[], \f[C]image/gif\f[], \f[C]image/jpeg\f[], or
|
868
|
-
\f[C]image/webp\f[] mime types). Raw HTML is replaced by a placeholder
|
869
|
-
HTML comment. Unsafe links are replaced by empty strings.
|
870
|
-
|
871
|
-
.PP
|
872
|
-
.nf
|
873
|
-
\fC
|
874
|
-
.RS 0n
|
875
|
-
#define CMARK_OPT_NOBREAKS (1 << 4)
|
876
|
-
.RE
|
877
|
-
\f[]
|
878
|
-
.fi
|
879
|
-
|
880
|
-
.PP
|
881
|
-
Render \f[C]softbreak\f[] elements as spaces.
|
882
|
-
|
883
|
-
.SS
|
884
|
-
Options affecting parsing
|
885
|
-
|
886
|
-
.PP
|
887
|
-
.nf
|
888
|
-
\fC
|
889
|
-
.RS 0n
|
890
|
-
#define CMARK_OPT_NORMALIZE (1 << 8)
|
891
|
-
.RE
|
892
|
-
\f[]
|
893
|
-
.fi
|
894
|
-
|
895
|
-
.PP
|
896
|
-
Legacy option (no effect).
|
897
|
-
|
898
|
-
.PP
|
899
|
-
.nf
|
900
|
-
\fC
|
901
|
-
.RS 0n
|
902
|
-
#define CMARK_OPT_VALIDATE_UTF8 (1 << 9)
|
903
|
-
.RE
|
904
|
-
\f[]
|
905
|
-
.fi
|
906
|
-
|
907
|
-
.PP
|
908
|
-
Validate UTF\-8 in the input before parsing, replacing illegal sequences
|
909
|
-
with the replacement character U+FFFD.
|
910
|
-
|
911
|
-
.PP
|
912
|
-
.nf
|
913
|
-
\fC
|
914
|
-
.RS 0n
|
915
|
-
#define CMARK_OPT_SMART (1 << 10)
|
916
|
-
.RE
|
917
|
-
\f[]
|
918
|
-
.fi
|
919
|
-
|
920
|
-
.PP
|
921
|
-
Convert straight quotes to curly, \-\-\- to em dashes, \-\- to en
|
922
|
-
dashes.
|
923
|
-
|
924
|
-
.PP
|
925
|
-
.nf
|
926
|
-
\fC
|
927
|
-
.RS 0n
|
928
|
-
#define CMARK_OPT_GITHUB_PRE_LANG (1 << 11)
|
929
|
-
.RE
|
930
|
-
\f[]
|
931
|
-
.fi
|
932
|
-
|
933
|
-
.PP
|
934
|
-
Use GitHub\-style tags for code blocks instead of .
|
935
|
-
|
936
|
-
.PP
|
937
|
-
.nf
|
938
|
-
\fC
|
939
|
-
.RS 0n
|
940
|
-
#define CMARK_OPT_LIBERAL_HTML_TAG (1 << 12)
|
941
|
-
.RE
|
942
|
-
\f[]
|
943
|
-
.fi
|
944
|
-
|
945
|
-
.PP
|
946
|
-
Be liberal in interpreting inline HTML tags.
|
947
|
-
|
948
|
-
.PP
|
949
|
-
.nf
|
950
|
-
\fC
|
951
|
-
.RS 0n
|
952
|
-
#define CMARK_OPT_FOOTNOTES (1 << 13)
|
953
|
-
.RE
|
954
|
-
\f[]
|
955
|
-
.fi
|
956
|
-
|
957
|
-
.PP
|
958
|
-
Parse footnotes.
|
959
|
-
|
960
|
-
.SS
|
961
|
-
Version information
|
962
|
-
|
963
|
-
.PP
|
964
|
-
\fIint\f[] \fBcmark_version\f[](\fIvoid\f[])
|
965
|
-
|
966
|
-
.PP
|
967
|
-
The library version as integer for runtime checks. Also available as
|
968
|
-
macro CMARK_VERSION for compile time checks.
|
969
|
-
.IP \[bu] 2
|
970
|
-
Bits 16\-23 contain the major version.
|
971
|
-
.IP \[bu] 2
|
972
|
-
Bits 8\-15 contain the minor version.
|
973
|
-
.IP \[bu] 2
|
974
|
-
Bits 0\-7 contain the patchlevel.
|
975
|
-
.PP
|
976
|
-
In hexadecimal format, the number 0x010203 represents version 1.2.3.
|
977
|
-
|
978
|
-
.PP
|
979
|
-
\fIconst char *\f[] \fBcmark_version_string\f[](\fIvoid\f[])
|
980
|
-
|
981
|
-
.PP
|
982
|
-
The library version string for runtime checks. Also available as macro
|
983
|
-
CMARK_VERSION_STRING for compile time checks.
|
984
|
-
|
985
|
-
.SH
|
986
|
-
AUTHORS
|
987
|
-
.PP
|
988
|
-
John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer.
|
989
|
-
|