apex-ruby 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +119 -0
- data/apex-ruby.gemspec +31 -0
- data/ext/apex_ext/apex_ext.c +215 -0
- data/ext/apex_ext/apex_src/BENCHMARK.md +32 -0
- data/ext/apex_ext/apex_src/BENCHMARK_COMPARISON.md +67 -0
- data/ext/apex_ext/apex_src/CHANGELOG.md +2454 -0
- data/ext/apex_ext/apex_src/CMakeLists.txt +454 -0
- data/ext/apex_ext/apex_src/Dockerfile.linux-build +15 -0
- data/ext/apex_ext/apex_src/Formula/apex.rb +38 -0
- data/ext/apex_ext/apex_src/Info.plist.in +27 -0
- data/ext/apex_ext/apex_src/LICENSE +21 -0
- data/ext/apex_ext/apex_src/Package.swift +160 -0
- data/ext/apex_ext/apex_src/PackageSupport/README.md +17 -0
- data/ext/apex_ext/apex_src/PackageSupport/cmark-gfm/cmark-gfm_export.h +20 -0
- data/ext/apex_ext/apex_src/PackageSupport/cmark-gfm/cmark-gfm_version.h +14 -0
- data/ext/apex_ext/apex_src/PackageSupport/cmark-gfm/cmark_gfm_spm_stub.c +4 -0
- data/ext/apex_ext/apex_src/PackageSupport/cmark-gfm/config.h +41 -0
- data/ext/apex_ext/apex_src/README.md +452 -0
- data/ext/apex_ext/apex_src/VERSION +1 -0
- data/ext/apex_ext/apex_src/apex-header-2-rb@2x.webp +0 -0
- data/ext/apex_ext/apex_src/apex-plugins.json.example +20 -0
- data/ext/apex_ext/apex_src/apex.pc.in +11 -0
- data/ext/apex_ext/apex_src/cli/main.c +2720 -0
- data/ext/apex_ext/apex_src/debug_test.sh +22 -0
- data/ext/apex_ext/apex_src/docs/API_REFERENCE.md +451 -0
- data/ext/apex_ext/apex_src/docs/ARCHITECTURE.md +166 -0
- data/ext/apex_ext/apex_src/docs/CMARK_INTEGRATION.md +220 -0
- data/ext/apex_ext/apex_src/docs/CRITICMARKUP.md +501 -0
- data/ext/apex_ext/apex_src/docs/DEBUGGING.md +73 -0
- data/ext/apex_ext/apex_src/docs/FINAL_STATUS.md +391 -0
- data/ext/apex_ext/apex_src/docs/FINAL_STATUS_UPDATE.md +237 -0
- data/ext/apex_ext/apex_src/docs/FUTURE_FEATURES.md +456 -0
- data/ext/apex_ext/apex_src/docs/IAL_FEATURES.md +210 -0
- data/ext/apex_ext/apex_src/docs/IAL_STATUS.md +344 -0
- data/ext/apex_ext/apex_src/docs/INTEGRATION_EXAMPLE.m +144 -0
- data/ext/apex_ext/apex_src/docs/LIMITATIONS_RESOLVED.md +278 -0
- data/ext/apex_ext/apex_src/docs/OUTPUT_MODES.md +321 -0
- data/ext/apex_ext/apex_src/docs/PROGRESS.md +167 -0
- data/ext/apex_ext/apex_src/docs/STANDALONE_FEATURE.md +174 -0
- data/ext/apex_ext/apex_src/docs/TABLE_SPANS_STATUS.md +243 -0
- data/ext/apex_ext/apex_src/docs/TEST_COVERAGE.md +316 -0
- data/ext/apex_ext/apex_src/docs/USER_GUIDE.md +803 -0
- data/ext/apex_ext/apex_src/docs/WIKI_LINKS_ISSUE.md +91 -0
- data/ext/apex_ext/apex_src/documentation/README.md +160 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex Command Line Options.cheatsheet.txt +365 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Info.plist +24 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/C-API.html +1737 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Citations.html +1420 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Command-Line-Options.html +3574 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Configuration.html +1603 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Credits.html +910 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Examples.html +1168 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Getting-Started.html +1003 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Header-IDs.html +1308 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Home.html +1078 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Inline-Attribute-Lists.html +1622 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Installation.html +1168 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Limitations-and-Roadmap.html +1698 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Metadata-Transforms.html +1531 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Modes.html +1980 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Multi-File-Documents.html +1368 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Pandoc-Integration.html +1151 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Plugins.html +2861 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Syntax.html +3981 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Troubleshooting.html +1454 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Usage.html +1200 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Xcode-Integration.html +2066 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/docSet.dsidx +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/optimizedIndex.dsidx +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/tempOptimizedIndex.dsidx +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Info.plist +22 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold_Italic.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold_Italic.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Italic.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold_Italic.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/index.html +914 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/style.css +399 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/docSet.dsidx +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/optimizedIndex.dsidx +0 -0
- data/ext/apex_ext/apex_src/documentation/generate_app_docs.rb +772 -0
- data/ext/apex_ext/apex_src/documentation/generate_app_docs_ai.rb +678 -0
- data/ext/apex_ext/apex_src/documentation/generate_docset.rb +873 -0
- data/ext/apex_ext/apex_src/documentation/generate_single_html.rb +733 -0
- data/ext/apex_ext/apex_src/documentation/html/apex-docs.html +17073 -0
- data/ext/apex_ext/apex_src/documentation/shared_scripts.js +64 -0
- data/ext/apex_ext/apex_src/documentation/shared_styles.css +646 -0
- data/ext/apex_ext/apex_src/documentation/transform_for_app.example.md +260 -0
- data/ext/apex_ext/apex_src/examples/bracketed_spans_demo.md +119 -0
- data/ext/apex_ext/apex_src/examples/emoji_span_plugin.yml +11 -0
- data/ext/apex_ext/apex_src/examples/example.html +53 -0
- data/ext/apex_ext/apex_src/examples/example.md +85 -0
- data/ext/apex_ext/apex_src/examples/fenced_divs_demo.md +158 -0
- data/ext/apex_ext/apex_src/examples/kbd.md +8 -0
- data/ext/apex_ext/apex_src/examples/kbd_plugin.rb +250 -0
- data/ext/apex_ext/apex_src/examples/kbd_plugin.yml +9 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-black.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-black@2x.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-mark.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-mark@2x.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-white.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-white@2x.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon@2x.png +0 -0
- data/ext/apex_ext/apex_src/include/apex/apex.h +247 -0
- data/ext/apex_ext/apex_src/include/apex/buffer.h +93 -0
- data/ext/apex_ext/apex_src/include/apex/module.modulemap +16 -0
- data/ext/apex_ext/apex_src/include/apex/parser.h +150 -0
- data/ext/apex_ext/apex_src/include/apex/renderer.h +39 -0
- data/ext/apex_ext/apex_src/man/apex-config.5 +374 -0
- data/ext/apex_ext/apex_src/man/apex-config.5.md +260 -0
- data/ext/apex_ext/apex_src/man/apex-plugins.7 +456 -0
- data/ext/apex_ext/apex_src/man/apex-plugins.7.md +365 -0
- data/ext/apex_ext/apex_src/man/apex.1 +828 -0
- data/ext/apex_ext/apex_src/man/apex.1.md +643 -0
- data/ext/apex_ext/apex_src/man/apex.1.new +338 -0
- data/ext/apex_ext/apex_src/objc/Apex.swift +237 -0
- data/ext/apex_ext/apex_src/objc/NSString+Apex.h +117 -0
- data/ext/apex_ext/apex_src/objc/NSString+Apex.m +332 -0
- data/ext/apex_ext/apex_src/src/_README.md +358 -0
- data/ext/apex_ext/apex_src/src/apex.c +6326 -0
- data/ext/apex_ext/apex_src/src/buffer.c +93 -0
- data/ext/apex_ext/apex_src/src/extensions/abbreviations.c +362 -0
- data/ext/apex_ext/apex_src/src/extensions/abbreviations.h +45 -0
- data/ext/apex_ext/apex_src/src/extensions/advanced_footnotes.c +184 -0
- data/ext/apex_ext/apex_src/src/extensions/advanced_footnotes.h +50 -0
- data/ext/apex_ext/apex_src/src/extensions/advanced_tables.c +1897 -0
- data/ext/apex_ext/apex_src/src/extensions/advanced_tables.h +42 -0
- data/ext/apex_ext/apex_src/src/extensions/callouts.c +215 -0
- data/ext/apex_ext/apex_src/src/extensions/callouts.h +53 -0
- data/ext/apex_ext/apex_src/src/extensions/citations.c +2042 -0
- data/ext/apex_ext/apex_src/src/extensions/citations.h +163 -0
- data/ext/apex_ext/apex_src/src/extensions/critic.c +329 -0
- data/ext/apex_ext/apex_src/src/extensions/critic.h +48 -0
- data/ext/apex_ext/apex_src/src/extensions/definition_list.c +1670 -0
- data/ext/apex_ext/apex_src/src/extensions/definition_list.h +42 -0
- data/ext/apex_ext/apex_src/src/extensions/emoji.c +710 -0
- data/ext/apex_ext/apex_src/src/extensions/emoji.h +38 -0
- data/ext/apex_ext/apex_src/src/extensions/emoji_data.h +942 -0
- data/ext/apex_ext/apex_src/src/extensions/fenced_divs.c +925 -0
- data/ext/apex_ext/apex_src/src/extensions/fenced_divs.h +43 -0
- data/ext/apex_ext/apex_src/src/extensions/github-emoji.txt +869 -0
- data/ext/apex_ext/apex_src/src/extensions/grid_tables.c +1121 -0
- data/ext/apex_ext/apex_src/src/extensions/grid_tables.h +33 -0
- data/ext/apex_ext/apex_src/src/extensions/header_ids.c +626 -0
- data/ext/apex_ext/apex_src/src/extensions/header_ids.h +60 -0
- data/ext/apex_ext/apex_src/src/extensions/highlight.c +135 -0
- data/ext/apex_ext/apex_src/src/extensions/highlight.h +16 -0
- data/ext/apex_ext/apex_src/src/extensions/html_markdown.c +408 -0
- data/ext/apex_ext/apex_src/src/extensions/html_markdown.h +42 -0
- data/ext/apex_ext/apex_src/src/extensions/ial.c +4084 -0
- data/ext/apex_ext/apex_src/src/extensions/ial.h +145 -0
- data/ext/apex_ext/apex_src/src/extensions/includes.c +1536 -0
- data/ext/apex_ext/apex_src/src/extensions/includes.h +54 -0
- data/ext/apex_ext/apex_src/src/extensions/index.c +967 -0
- data/ext/apex_ext/apex_src/src/extensions/index.h +90 -0
- data/ext/apex_ext/apex_src/src/extensions/inline_footnotes.c +205 -0
- data/ext/apex_ext/apex_src/src/extensions/inline_footnotes.h +34 -0
- data/ext/apex_ext/apex_src/src/extensions/inline_tables.c +332 -0
- data/ext/apex_ext/apex_src/src/extensions/inline_tables.h +13 -0
- data/ext/apex_ext/apex_src/src/extensions/insert.c +248 -0
- data/ext/apex_ext/apex_src/src/extensions/insert.h +18 -0
- data/ext/apex_ext/apex_src/src/extensions/math.c +279 -0
- data/ext/apex_ext/apex_src/src/extensions/math.h +32 -0
- data/ext/apex_ext/apex_src/src/extensions/metadata.c +3046 -0
- data/ext/apex_ext/apex_src/src/extensions/metadata.h +125 -0
- data/ext/apex_ext/apex_src/src/extensions/relaxed_tables.c +1297 -0
- data/ext/apex_ext/apex_src/src/extensions/relaxed_tables.h +39 -0
- data/ext/apex_ext/apex_src/src/extensions/special_markers.c +194 -0
- data/ext/apex_ext/apex_src/src/extensions/special_markers.h +29 -0
- data/ext/apex_ext/apex_src/src/extensions/sup_sub.c +405 -0
- data/ext/apex_ext/apex_src/src/extensions/sup_sub.h +16 -0
- data/ext/apex_ext/apex_src/src/extensions/syntax_highlight.c +468 -0
- data/ext/apex_ext/apex_src/src/extensions/syntax_highlight.h +44 -0
- data/ext/apex_ext/apex_src/src/extensions/table_html_postprocess.c +2679 -0
- data/ext/apex_ext/apex_src/src/extensions/table_html_postprocess.h +23 -0
- data/ext/apex_ext/apex_src/src/extensions/toc.c +255 -0
- data/ext/apex_ext/apex_src/src/extensions/toc.h +34 -0
- data/ext/apex_ext/apex_src/src/extensions/wiki_links.c +624 -0
- data/ext/apex_ext/apex_src/src/extensions/wiki_links.h +58 -0
- data/ext/apex_ext/apex_src/src/html_renderer.c +2762 -0
- data/ext/apex_ext/apex_src/src/html_renderer.h +126 -0
- data/ext/apex_ext/apex_src/src/parser.c +227 -0
- data/ext/apex_ext/apex_src/src/plugins.c +895 -0
- data/ext/apex_ext/apex_src/src/plugins.h +39 -0
- data/ext/apex_ext/apex_src/src/plugins_env.c +187 -0
- data/ext/apex_ext/apex_src/src/plugins_remote.c +263 -0
- data/ext/apex_ext/apex_src/src/pretty_html.c +358 -0
- data/ext/apex_ext/apex_src/src/renderer.c +241 -0
- data/ext/apex_ext/apex_src/src/utf8.c +56 -0
- data/ext/apex_ext/apex_src/test-linux-build.sh +20 -0
- data/ext/apex_ext/apex_src/test.html +103 -0
- data/ext/apex_ext/apex_src/test_coverage.sh +121 -0
- data/ext/apex_ext/apex_src/test_ial_fenced.md +6 -0
- data/ext/apex_ext/apex_src/test_math_norm.py +79 -0
- data/ext/apex_ext/apex_src/test_pandoc_output.html +48 -0
- data/ext/apex_ext/apex_src/test_spm.sh +107 -0
- data/ext/apex_ext/apex_src/tests/ApexSPMTest/main.swift +50 -0
- data/ext/apex_ext/apex_src/tests/BENCHMARK_RESULTS.md +229 -0
- data/ext/apex_ext/apex_src/tests/CMakeLists.txt +24 -0
- data/ext/apex_ext/apex_src/tests/README.md +146 -0
- data/ext/apex_ext/apex_src/tests/benchmark.sh +113 -0
- data/ext/apex_ext/apex_src/tests/benchmark_comparison.sh +166 -0
- data/ext/apex_ext/apex_src/tests/compare_header_ids.sh +31 -0
- data/ext/apex_ext/apex_src/tests/fixtures/basic/headers.md +25 -0
- data/ext/apex_ext/apex_src/tests/fixtures/basic/list-interruption.md +24 -0
- data/ext/apex_ext/apex_src/tests/fixtures/basic/misc_markup.md +33 -0
- data/ext/apex_ext/apex_src/tests/fixtures/basic/test_basic.md +26 -0
- data/ext/apex_ext/apex_src/tests/fixtures/code/code-blocks.md +260 -0
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/SUMMARY.md +6 -0
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/chapter1.md +7 -0
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/index.txt +9 -0
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/intro.md +5 -0
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/section1_1.md +5 -0
- data/ext/apex_ext/apex_src/tests/fixtures/comprehensive_test.md +620 -0
- data/ext/apex_ext/apex_src/tests/fixtures/debug_ref_image_ial.md +3 -0
- data/ext/apex_ext/apex_src/tests/fixtures/demos/ial.md +11 -0
- data/ext/apex_ext/apex_src/tests/fixtures/demos/ial_demo.md +177 -0
- data/ext/apex_ext/apex_src/tests/fixtures/extensions/emoji-autocorrect.md +94 -0
- data/ext/apex_ext/apex_src/tests/fixtures/extensions/emoji_test.md +3 -0
- data/ext/apex_ext/apex_src/tests/fixtures/extensions/kbd_test.md +3 -0
- data/ext/apex_ext/apex_src/tests/fixtures/ial/bracketed_spans_test.md +74 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/image_and_encoding_test.md +27 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/multimarkdown_image_attributes_test.md +60 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/pandoc_ial_image_test.md +27 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/width_height_conversion_test.md +94 -0
- data/ext/apex_ext/apex_src/tests/fixtures/img-in-div.md +16 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/code.py +4 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/data.csv +5 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/data.tsv +5 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/image.png +2 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/metadata_options.yml +11 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/nested.md +8 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/raw.html +4 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/simple.md +7 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/test_image.png +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/large_doc.md +1094 -0
- data/ext/apex_ext/apex_src/tests/fixtures/metadata_options.yml +11 -0
- data/ext/apex_ext/apex_src/tests/fixtures/output/gfm_header_id_test.md +96 -0
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_citations.md +43 -0
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_def_list_links.md +12 -0
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_index_mmark.md +53 -0
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_index_textindex.md +37 -0
- data/ext/apex_ext/apex_src/tests/fixtures/tables/advanced_tables_test.md +93 -0
- data/ext/apex_ext/apex_src/tests/fixtures/tables/inline_tables_test.md +38 -0
- data/ext/apex_ext/apex_src/tests/fixtures/tables/relaxed-table.md +12 -0
- data/ext/apex_ext/apex_src/tests/fixtures/tables/table_cr_line_endings.md +15 -0
- data/ext/apex_ext/apex_src/tests/fixtures/tables/table_no_trailing_newline.md +15 -0
- data/ext/apex_ext/apex_src/tests/generate_gfm_ids.sh +105 -0
- data/ext/apex_ext/apex_src/tests/generate_ial_demo.sh +143 -0
- data/ext/apex_ext/apex_src/tests/gfm_id_comparison_summary.md +96 -0
- data/ext/apex_ext/apex_src/tests/gh_api_test.md +6 -0
- data/ext/apex_ext/apex_src/tests/ial_demo.html +186 -0
- data/ext/apex_ext/apex_src/tests/include_code.py +19 -0
- data/ext/apex_ext/apex_src/tests/include_snippet.md +15 -0
- data/ext/apex_ext/apex_src/tests/multi_file_cli_test.sh +64 -0
- data/ext/apex_ext/apex_src/tests/sample_data.csv +7 -0
- data/ext/apex_ext/apex_src/tests/table_escaped_ltlt.md +4 -0
- data/ext/apex_ext/apex_src/tests/test_basic.c +74 -0
- data/ext/apex_ext/apex_src/tests/test_extensions.c +2116 -0
- data/ext/apex_ext/apex_src/tests/test_helpers.c +183 -0
- data/ext/apex_ext/apex_src/tests/test_helpers.h +91 -0
- data/ext/apex_ext/apex_src/tests/test_ial.c +282 -0
- data/ext/apex_ext/apex_src/tests/test_links.c +418 -0
- data/ext/apex_ext/apex_src/tests/test_marked_integration.c +265 -0
- data/ext/apex_ext/apex_src/tests/test_metadata.c +908 -0
- data/ext/apex_ext/apex_src/tests/test_output.c +1118 -0
- data/ext/apex_ext/apex_src/tests/test_plugins.c +219 -0
- data/ext/apex_ext/apex_src/tests/test_refs.bib +31 -0
- data/ext/apex_ext/apex_src/tests/test_runner.c +244 -0
- data/ext/apex_ext/apex_src/tests/test_syntax_highlight.c +198 -0
- data/ext/apex_ext/apex_src/tests/test_tables.c +862 -0
- data/ext/apex_ext/apex_src/tests/update_benchmarks.sh +9 -0
- data/ext/apex_ext/apex_src/tests/yaml_test.md +13 -0
- data/ext/apex_ext/apex_src/tests.rb +39 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/CMakeLists.txt +48 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/COPYING +170 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/CheckFileOffsetBits.c +14 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/CheckFileOffsetBits.cmake +43 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/FindAsan.cmake +74 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/Makefile.nmake +38 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/README.md +206 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/CMakeLists.txt +30 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/cplusplus.cpp +15 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/cplusplus.h +16 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/harness.c +111 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/harness.h +35 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/main.c +1169 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/appveyor.yml +21 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-bq-flat.md +16 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-bq-nested.md +13 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-code.md +11 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-fences.md +14 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-heading.md +9 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-hr.md +10 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-html.md +32 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-lheading.md +8 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-list-flat.md +67 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-list-nested.md +36 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-ref-flat.md +15 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-ref-nested.md +17 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-autolink.md +14 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-backticks.md +3 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-flat.md +5 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-nested.md +5 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-worst.md +5 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-entity.md +11 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-escape.md +15 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-html.md +44 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-links-flat.md +23 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-links-nested.md +13 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-newlines.md +24 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/lorem1.md +13 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/rawtabs.md +18 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/statistics.py +595 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/stats.py +19 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/benchmarks.md +33 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/changelog.txt +1245 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/data/CaseFolding.txt +1495 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/CMakeLists.txt +119 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/autolink.c +508 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/autolink.h +8 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/cmark-gfm-core-extensions.h +54 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/core-extensions.c +27 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/ext_scanners.c +879 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/ext_scanners.h +24 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/ext_scanners.re +92 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/strikethrough.c +167 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/strikethrough.h +9 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/table.c +917 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/table.h +12 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/tagfilter.c +60 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/tagfilter.h +8 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/tasklist.c +156 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/tasklist.h +8 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/CMakeLists.txt +22 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/README.md +12 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzz_quadratic.c +91 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzz_quadratic_brackets.c +110 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzzloop.sh +28 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/CMakeLists.txt +10 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/make_man_page.py +133 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/man1/cmark-gfm.1 +78 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/man3/cmark-gfm.3 +1041 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/nmake.bat +1 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/CMakeLists.txt +230 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/arena.c +104 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/blocks.c +1622 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/buffer.c +278 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/buffer.h +116 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/case_fold_switch.inc +4327 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/chunk.h +135 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark-gfm-extension_api.h +737 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark-gfm.h +833 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark-gfm_version.h.in +7 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark.c +55 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark_ctype.c +44 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark_ctype.h +33 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/commonmark.c +514 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/config.h.in +76 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/entities.inc +2138 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/footnotes.c +63 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/footnotes.h +27 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/houdini.h +57 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/houdini_href_e.c +100 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/houdini_html_e.c +66 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/houdini_html_u.c +149 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/html.c +502 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/html.h +27 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/inlines.c +1788 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/inlines.h +29 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/iterator.c +159 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/iterator.h +26 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/latex.c +468 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/libcmark-gfm.pc.in +10 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/linked_list.c +37 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/main.c +328 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/man.c +274 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/map.c +129 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/map.h +44 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/node.c +1045 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/node.h +167 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/parser.h +59 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/plaintext.c +218 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/plugin.c +36 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/plugin.h +34 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/references.c +43 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/references.h +26 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/registry.c +63 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/registry.h +24 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/render.c +213 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/render.h +62 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/scanners.c +14056 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/scanners.h +70 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/scanners.re +365 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/syntax_extension.c +149 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/syntax_extension.h +34 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/utf8.c +317 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/utf8.h +35 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/xml.c +182 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/suppressions +10 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/CMakeLists.txt +114 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/afl_test_cases/test.md +49 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/cmark-fuzz.c +58 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/cmark.py +105 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/entity_tests.py +67 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/extensions-full-info-string.txt +0 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/extensions-table-prefer-style-attributes.txt +38 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/extensions.txt +920 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/fuzzing_dictionary +67 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/normalize.py +194 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/pathological_tests.py +160 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/regression.txt +375 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/roundtrip_tests.py +50 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/run-cmark-fuzz +4 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/smart_punct.txt +177 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/spec.txt +10212 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/spec_tests.py +152 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/toolchain-mingw32.cmake +17 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/Dockerfile +41 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/appveyor-build.bat +13 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/make_entities_inc.py +32 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/mkcasefold.pl +22 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/xml2md.xsl +319 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/xml2md_gfm.xsl +80 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/why-cmark-and-not-x.md +104 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.js +6 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.py +37 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.rb +15 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.rkt +208 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper_ext.py +109 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/CMakeLists.txt +160 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/Changes +372 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/License +20 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/Makefile.am +51 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/ReadMe.md +46 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/announcement.msg +89 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/bootstrap +3 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/cmake/config.h.in +4 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/configure.ac +73 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/doc/doxygen.cfg +222 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/README.mkd +17 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/alpine-3.7 +26 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/fedora-25 +26 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/ubuntu-14.04 +29 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/ubuntu-16.04 +24 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/anchors.yaml +10 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/array.yaml +2 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/global-tag.yaml +14 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/json.yaml +1 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/mapping.yaml +2 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/numbers.yaml +1 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/strings.yaml +7 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/tags.yaml +7 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/yaml-version.yaml +3 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/include/Makefile.am +17 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/include/yaml.h +1999 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/ReadMe.md +77 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/Dockerfile +32 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/output/ReadMe +1 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/scripts/libyaml-dist.sh +23 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/regression-inputs/clusterfuzz-testcase-minimized-5607885063061504.yml +1 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/src/Makefile.am +4 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/src/api.c +1393 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/src/dumper.c +394 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/src/emitter.c +2358 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/src/loader.c +544 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/src/parser.c +1416 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/src/reader.c +469 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/src/scanner.c +3598 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/src/writer.c +141 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/src/yaml_private.h +684 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/CMakeLists.txt +27 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/Makefile.am +9 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/ReadMe.md +63 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-deconstructor-alt.c +800 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-deconstructor.c +1127 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-reformatter-alt.c +217 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-reformatter.c +202 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-all-tests.sh +29 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-dumper.c +314 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-emitter-test-suite.c +290 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-emitter.c +327 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-loader.c +63 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-parser-test-suite.c +196 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-parser.c +88 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-scanner.c +63 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/test-reader.c +354 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/test-version.c +29 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/yaml-0.1.pc.in +10 -0
- data/ext/apex_ext/apex_src/vendor/libyaml/yamlConfig.cmake.in +16 -0
- data/ext/apex_ext/extconf.rb +103 -0
- data/lib/apex/configurable.rb +46 -0
- data/lib/apex/document.rb +66 -0
- data/lib/apex/version.rb +15 -0
- data/lib/apex.rb +28 -0
- metadata +544 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
require 'English'
|
|
3
|
+
|
|
4
|
+
errors_only = "true" =~ /^[ty]/i
|
|
5
|
+
suite = "all"
|
|
6
|
+
out = ""
|
|
7
|
+
code = 0
|
|
8
|
+
|
|
9
|
+
def normalize_suite(suite)
|
|
10
|
+
files = Dir.glob("tests/test_*.rb")
|
|
11
|
+
suite = suite.split('').join('.*')
|
|
12
|
+
if suite && !suite.empty?
|
|
13
|
+
files.delete_if { |f| f !~ /#{suite}/ }
|
|
14
|
+
end
|
|
15
|
+
files.map { |f| File.basename(f, '.rb') }
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
if suite =~ /^all/i
|
|
19
|
+
out = `./build/apex_test_runner 2>&1`
|
|
20
|
+
code = $CHILD_STATUS.exitstatus
|
|
21
|
+
else
|
|
22
|
+
|
|
23
|
+
test_files = normalize_suite(suite)
|
|
24
|
+
|
|
25
|
+
test_files.each do |file|
|
|
26
|
+
out += `./build/apex_test_runner #{file} 2>&1`
|
|
27
|
+
if $CHILD_STATUS.exitstatus != 0
|
|
28
|
+
code = $CHILD_STATUS.exitstatus
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
if errors_only
|
|
34
|
+
puts out.lines.select { |line| line =~ /✗/ }.join
|
|
35
|
+
else
|
|
36
|
+
puts out
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
exit code
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.0)
|
|
2
|
+
project(cmark-gfm)
|
|
3
|
+
|
|
4
|
+
set(PROJECT_VERSION_MAJOR 0)
|
|
5
|
+
set(PROJECT_VERSION_MINOR 29)
|
|
6
|
+
set(PROJECT_VERSION_PATCH 0)
|
|
7
|
+
set(PROJECT_VERSION_GFM 13)
|
|
8
|
+
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.gfm.${PROJECT_VERSION_GFM})
|
|
9
|
+
|
|
10
|
+
include("FindAsan.cmake")
|
|
11
|
+
include("CheckFileOffsetBits.cmake")
|
|
12
|
+
|
|
13
|
+
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
|
14
|
+
message(FATAL_ERROR "Do not build in-source.\nPlease remove CMakeCache.txt and the CMakeFiles/ directory.\nThen: mkdir build ; cd build ; cmake .. ; make")
|
|
15
|
+
endif()
|
|
16
|
+
|
|
17
|
+
option(CMARK_TESTS "Build cmark-gfm tests and enable testing" ON)
|
|
18
|
+
option(CMARK_STATIC "Build static libcmark-gfm library" ON)
|
|
19
|
+
option(CMARK_SHARED "Build shared libcmark-gfm library" ON)
|
|
20
|
+
option(CMARK_LIB_FUZZER "Build libFuzzer fuzzing harness" OFF)
|
|
21
|
+
option(CMARK_FUZZ_QUADRATIC "Build quadratic fuzzing harness" OFF)
|
|
22
|
+
|
|
23
|
+
if(CMARK_FUZZ_QUADRATIC)
|
|
24
|
+
set(FUZZER_FLAGS "-fsanitize=fuzzer-no-link,address -g")
|
|
25
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FUZZER_FLAGS}")
|
|
26
|
+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FUZZER_FLAGS}")
|
|
27
|
+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FUZZER_FLAGS}")
|
|
28
|
+
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${FUZZER_FLAGS}")
|
|
29
|
+
endif()
|
|
30
|
+
|
|
31
|
+
add_subdirectory(src)
|
|
32
|
+
add_subdirectory(extensions)
|
|
33
|
+
if(CMARK_TESTS AND (CMARK_SHARED OR CMARK_STATIC))
|
|
34
|
+
add_subdirectory(api_test)
|
|
35
|
+
endif()
|
|
36
|
+
add_subdirectory(man)
|
|
37
|
+
if(CMARK_TESTS)
|
|
38
|
+
enable_testing()
|
|
39
|
+
add_subdirectory(test testdir)
|
|
40
|
+
endif()
|
|
41
|
+
if(CMARK_FUZZ_QUADRATIC)
|
|
42
|
+
add_subdirectory(fuzz)
|
|
43
|
+
endif()
|
|
44
|
+
|
|
45
|
+
if(NOT CMAKE_BUILD_TYPE)
|
|
46
|
+
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
|
|
47
|
+
"Choose the type of build, options are: Debug Profile Release Asan Ubsan." FORCE)
|
|
48
|
+
endif(NOT CMAKE_BUILD_TYPE)
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
Copyright (c) 2014, John MacFarlane
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
* Redistributions of source code must retain the above copyright
|
|
9
|
+
notice, this list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
* Redistributions in binary form must reproduce the above
|
|
12
|
+
copyright notice, this list of conditions and the following
|
|
13
|
+
disclaimer in the documentation and/or other materials provided
|
|
14
|
+
with the distribution.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
17
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
18
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
19
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
20
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
21
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
22
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
23
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
24
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
25
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
26
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
27
|
+
|
|
28
|
+
-----
|
|
29
|
+
|
|
30
|
+
houdini.h, houdini_href_e.c, houdini_html_e.c, houdini_html_u.c
|
|
31
|
+
|
|
32
|
+
derive from https://github.com/vmg/houdini (with some modifications)
|
|
33
|
+
|
|
34
|
+
Copyright (C) 2012 Vicent Martí
|
|
35
|
+
|
|
36
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
37
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
38
|
+
the Software without restriction, including without limitation the rights to
|
|
39
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
40
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
41
|
+
so, subject to the following conditions:
|
|
42
|
+
|
|
43
|
+
The above copyright notice and this permission notice shall be included in all
|
|
44
|
+
copies or substantial portions of the Software.
|
|
45
|
+
|
|
46
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
47
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
48
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
49
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
50
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
51
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
52
|
+
SOFTWARE.
|
|
53
|
+
|
|
54
|
+
-----
|
|
55
|
+
|
|
56
|
+
buffer.h, buffer.c, chunk.h
|
|
57
|
+
|
|
58
|
+
are derived from code (C) 2012 Github, Inc.
|
|
59
|
+
|
|
60
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
61
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
62
|
+
the Software without restriction, including without limitation the rights to
|
|
63
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
64
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
65
|
+
so, subject to the following conditions:
|
|
66
|
+
|
|
67
|
+
The above copyright notice and this permission notice shall be included in all
|
|
68
|
+
copies or substantial portions of the Software.
|
|
69
|
+
|
|
70
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
71
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
72
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
73
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
74
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
75
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
76
|
+
SOFTWARE.
|
|
77
|
+
|
|
78
|
+
-----
|
|
79
|
+
|
|
80
|
+
utf8.c and utf8.c
|
|
81
|
+
|
|
82
|
+
are derived from utf8proc
|
|
83
|
+
(<http://www.public-software-group.org/utf8proc>),
|
|
84
|
+
(C) 2009 Public Software Group e. V., Berlin, Germany.
|
|
85
|
+
|
|
86
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
87
|
+
copy of this software and associated documentation files (the "Software"),
|
|
88
|
+
to deal in the Software without restriction, including without limitation
|
|
89
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
90
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
|
91
|
+
Software is furnished to do so, subject to the following conditions:
|
|
92
|
+
|
|
93
|
+
The above copyright notice and this permission notice shall be included in
|
|
94
|
+
all copies or substantial portions of the Software.
|
|
95
|
+
|
|
96
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
97
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
98
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
99
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
100
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
101
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
102
|
+
DEALINGS IN THE SOFTWARE.
|
|
103
|
+
|
|
104
|
+
-----
|
|
105
|
+
|
|
106
|
+
The normalization code in normalize.py was derived from the
|
|
107
|
+
markdowntest project, Copyright 2013 Karl Dubost:
|
|
108
|
+
|
|
109
|
+
The MIT License (MIT)
|
|
110
|
+
|
|
111
|
+
Copyright (c) 2013 Karl Dubost
|
|
112
|
+
|
|
113
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
114
|
+
a copy of this software and associated documentation files (the
|
|
115
|
+
"Software"), to deal in the Software without restriction, including
|
|
116
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
117
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
118
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
119
|
+
the following conditions:
|
|
120
|
+
|
|
121
|
+
The above copyright notice and this permission notice shall be
|
|
122
|
+
included in all copies or substantial portions of the Software.
|
|
123
|
+
|
|
124
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
125
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
126
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
127
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
128
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
129
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
130
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
131
|
+
|
|
132
|
+
-----
|
|
133
|
+
|
|
134
|
+
The CommonMark spec (test/spec.txt) is
|
|
135
|
+
|
|
136
|
+
Copyright (C) 2014-15 John MacFarlane
|
|
137
|
+
|
|
138
|
+
Released under the Creative Commons CC-BY-SA 4.0 license:
|
|
139
|
+
<http://creativecommons.org/licenses/by-sa/4.0/>.
|
|
140
|
+
|
|
141
|
+
-----
|
|
142
|
+
|
|
143
|
+
The test software in test/ is
|
|
144
|
+
|
|
145
|
+
Copyright (c) 2014, John MacFarlane
|
|
146
|
+
|
|
147
|
+
All rights reserved.
|
|
148
|
+
|
|
149
|
+
Redistribution and use in source and binary forms, with or without
|
|
150
|
+
modification, are permitted provided that the following conditions are met:
|
|
151
|
+
|
|
152
|
+
* Redistributions of source code must retain the above copyright
|
|
153
|
+
notice, this list of conditions and the following disclaimer.
|
|
154
|
+
|
|
155
|
+
* Redistributions in binary form must reproduce the above
|
|
156
|
+
copyright notice, this list of conditions and the following
|
|
157
|
+
disclaimer in the documentation and/or other materials provided
|
|
158
|
+
with the distribution.
|
|
159
|
+
|
|
160
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
161
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
162
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
163
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
164
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
165
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
166
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
167
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
168
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
169
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
170
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#include <sys/types.h>
|
|
2
|
+
|
|
3
|
+
#define KB ((off_t)1024)
|
|
4
|
+
#define MB ((off_t)1024 * KB)
|
|
5
|
+
#define GB ((off_t)1024 * MB)
|
|
6
|
+
#define TB ((off_t)1024 * GB)
|
|
7
|
+
int t2[(((64 * GB -1) % 671088649) == 268434537)
|
|
8
|
+
&& (((TB - (64 * GB -1) + 255) % 1792151290) == 305159546)? 1: -1];
|
|
9
|
+
|
|
10
|
+
int main()
|
|
11
|
+
{
|
|
12
|
+
;
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# - Check if _FILE_OFFSET_BITS macro needed for large files
|
|
2
|
+
# CHECK_FILE_OFFSET_BITS ()
|
|
3
|
+
#
|
|
4
|
+
# The following variables may be set before calling this macro to
|
|
5
|
+
# modify the way the check is run:
|
|
6
|
+
#
|
|
7
|
+
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
|
8
|
+
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
|
9
|
+
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
|
10
|
+
# Copyright (c) 2009, Michihiro NAKAJIMA
|
|
11
|
+
#
|
|
12
|
+
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
13
|
+
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
14
|
+
|
|
15
|
+
#INCLUDE(CheckCSourceCompiles)
|
|
16
|
+
|
|
17
|
+
GET_FILENAME_COMPONENT(_selfdir_CheckFileOffsetBits
|
|
18
|
+
"${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
19
|
+
|
|
20
|
+
MACRO (CHECK_FILE_OFFSET_BITS)
|
|
21
|
+
IF(NOT DEFINED _FILE_OFFSET_BITS)
|
|
22
|
+
MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files")
|
|
23
|
+
TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64
|
|
24
|
+
${CMAKE_CURRENT_BINARY_DIR}
|
|
25
|
+
${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
|
|
26
|
+
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
|
|
27
|
+
IF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
|
|
28
|
+
TRY_COMPILE(__WITH_FILE_OFFSET_BITS_64
|
|
29
|
+
${CMAKE_CURRENT_BINARY_DIR}
|
|
30
|
+
${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
|
|
31
|
+
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_FILE_OFFSET_BITS=64)
|
|
32
|
+
ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
|
|
33
|
+
|
|
34
|
+
IF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
|
|
35
|
+
SET(_FILE_OFFSET_BITS 64 CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
|
|
36
|
+
MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - needed")
|
|
37
|
+
ELSE(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
|
|
38
|
+
SET(_FILE_OFFSET_BITS "" CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
|
|
39
|
+
MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - not needed")
|
|
40
|
+
ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
|
|
41
|
+
ENDIF(NOT DEFINED _FILE_OFFSET_BITS)
|
|
42
|
+
|
|
43
|
+
ENDMACRO (CHECK_FILE_OFFSET_BITS)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#
|
|
2
|
+
# The MIT License (MIT)
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2013 Matthew Arsenault
|
|
5
|
+
#
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
# furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
# THE SOFTWARE.
|
|
23
|
+
#
|
|
24
|
+
# This module tests if address sanitizer is supported by the compiler,
|
|
25
|
+
# and creates a ASan build type (i.e. set CMAKE_BUILD_TYPE=ASan to use
|
|
26
|
+
# it). This sets the following variables:
|
|
27
|
+
#
|
|
28
|
+
# CMAKE_C_FLAGS_ASAN - Flags to use for C with asan
|
|
29
|
+
# CMAKE_CXX_FLAGS_ASAN - Flags to use for C++ with asan
|
|
30
|
+
# HAVE_ADDRESS_SANITIZER - True or false if the ASan build type is available
|
|
31
|
+
|
|
32
|
+
include(CheckCCompilerFlag)
|
|
33
|
+
|
|
34
|
+
# Set -Werror to catch "argument unused during compilation" warnings
|
|
35
|
+
set(CMAKE_REQUIRED_FLAGS "-Werror -faddress-sanitizer") # Also needs to be a link flag for test to pass
|
|
36
|
+
check_c_compiler_flag("-faddress-sanitizer" HAVE_FLAG_ADDRESS_SANITIZER)
|
|
37
|
+
|
|
38
|
+
set(CMAKE_REQUIRED_FLAGS "-Werror -fsanitize=address") # Also needs to be a link flag for test to pass
|
|
39
|
+
check_c_compiler_flag("-fsanitize=address" HAVE_FLAG_SANITIZE_ADDRESS)
|
|
40
|
+
|
|
41
|
+
unset(CMAKE_REQUIRED_FLAGS)
|
|
42
|
+
|
|
43
|
+
if(HAVE_FLAG_SANITIZE_ADDRESS)
|
|
44
|
+
# Clang 3.2+ use this version
|
|
45
|
+
set(ADDRESS_SANITIZER_FLAG "-fsanitize=address")
|
|
46
|
+
elseif(HAVE_FLAG_ADDRESS_SANITIZER)
|
|
47
|
+
# Older deprecated flag for ASan
|
|
48
|
+
set(ADDRESS_SANITIZER_FLAG "-faddress-sanitizer")
|
|
49
|
+
endif()
|
|
50
|
+
|
|
51
|
+
if(NOT ADDRESS_SANITIZER_FLAG)
|
|
52
|
+
return()
|
|
53
|
+
else(NOT ADDRESS_SANITIZER_FLAG)
|
|
54
|
+
set(HAVE_ADDRESS_SANITIZER FALSE)
|
|
55
|
+
endif()
|
|
56
|
+
|
|
57
|
+
set(HAVE_ADDRESS_SANITIZER TRUE)
|
|
58
|
+
|
|
59
|
+
set(CMAKE_C_FLAGS_ASAN "-O1 -g ${ADDRESS_SANITIZER_FLAG} -fno-omit-frame-pointer -fno-optimize-sibling-calls"
|
|
60
|
+
CACHE STRING "Flags used by the C compiler during ASan builds."
|
|
61
|
+
FORCE)
|
|
62
|
+
set(CMAKE_CXX_FLAGS_ASAN "-O1 -g ${ADDRESS_SANITIZER_FLAG} -fno-omit-frame-pointer -fno-optimize-sibling-calls"
|
|
63
|
+
CACHE STRING "Flags used by the C++ compiler during ASan builds."
|
|
64
|
+
FORCE)
|
|
65
|
+
set(CMAKE_EXE_LINKER_FLAGS_ASAN "${ADDRESS_SANITIZER_FLAG}"
|
|
66
|
+
CACHE STRING "Flags used for linking binaries during ASan builds."
|
|
67
|
+
FORCE)
|
|
68
|
+
set(CMAKE_SHARED_LINKER_FLAGS_ASAN "${ADDRESS_SANITIZER_FLAG}"
|
|
69
|
+
CACHE STRING "Flags used by the shared libraries linker during ASan builds."
|
|
70
|
+
FORCE)
|
|
71
|
+
mark_as_advanced(CMAKE_C_FLAGS_ASAN
|
|
72
|
+
CMAKE_CXX_FLAGS_ASAN
|
|
73
|
+
CMAKE_EXE_LINKER_FLAGS_ASAN
|
|
74
|
+
CMAKE_SHARED_LINKER_FLAGS_ASAN)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
SRCDIR=src
|
|
2
|
+
DATADIR=data
|
|
3
|
+
BUILDDIR=build
|
|
4
|
+
INSTALLDIR=windows
|
|
5
|
+
SPEC=test/spec.txt
|
|
6
|
+
PROG=$(BUILDDIR)\src\cmark-gfm.exe
|
|
7
|
+
GENERATOR=NMake Makefiles
|
|
8
|
+
|
|
9
|
+
all: $(BUILDDIR)/CMakeFiles
|
|
10
|
+
@cd $(BUILDDIR) && $(MAKE) /nologo && cd ..
|
|
11
|
+
|
|
12
|
+
$(BUILDDIR)/CMakeFiles:
|
|
13
|
+
@-mkdir $(BUILDDIR) 2> nul
|
|
14
|
+
cd $(BUILDDIR) && \
|
|
15
|
+
cmake \
|
|
16
|
+
-G "$(GENERATOR)" \
|
|
17
|
+
-D CMAKE_BUILD_TYPE=$(BUILD_TYPE) \
|
|
18
|
+
-D CMAKE_INSTALL_PREFIX=$(INSTALLDIR) \
|
|
19
|
+
-D CMARK_STATIC=ON \
|
|
20
|
+
-D CMARK_SHARED=OFF \
|
|
21
|
+
.. && \
|
|
22
|
+
cd ..
|
|
23
|
+
|
|
24
|
+
install: all
|
|
25
|
+
@cd $(BUILDDIR) && $(MAKE) /nologo install && cd ..
|
|
26
|
+
|
|
27
|
+
clean:
|
|
28
|
+
-rmdir /s /q $(BUILDDIR) $(MINGW_INSTALLDIR) 2> nul
|
|
29
|
+
|
|
30
|
+
$(SRCDIR)\case_fold_switch.inc: $(DATADIR)\CaseFolding-3.2.0.txt
|
|
31
|
+
perl mkcasefold.pl < $? > $@
|
|
32
|
+
|
|
33
|
+
test: $(SPEC) all
|
|
34
|
+
@cd $(BUILDDIR) && $(MAKE) /nologo test ARGS="-V" && cd ..
|
|
35
|
+
|
|
36
|
+
distclean: clean
|
|
37
|
+
del /q src\scanners.c 2> nul
|
|
38
|
+
del /q spec.md spec.html 2> nul
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
cmark-gfm
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
`cmark-gfm` is an extended version of the C reference implementation of
|
|
7
|
+
[CommonMark], a rationalized version of Markdown syntax with a spec. This
|
|
8
|
+
repository adds GitHub Flavored Markdown extensions to
|
|
9
|
+
[the upstream implementation], as defined in [the spec].
|
|
10
|
+
|
|
11
|
+
The rest of the README is preserved as-is from the upstream source. Note that
|
|
12
|
+
the library and binaries produced by this fork are suffixed with `-gfm` in
|
|
13
|
+
order to distinguish them from the upstream.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
It provides a shared library (`libcmark`) with functions for parsing
|
|
18
|
+
CommonMark documents to an abstract syntax tree (AST), manipulating
|
|
19
|
+
the AST, and rendering the document to HTML, groff man, LaTeX,
|
|
20
|
+
CommonMark, or an XML representation of the AST. It also provides a
|
|
21
|
+
command-line program (`cmark`) for parsing and rendering CommonMark
|
|
22
|
+
documents.
|
|
23
|
+
|
|
24
|
+
Advantages of this library:
|
|
25
|
+
|
|
26
|
+
- **Portable.** The library and program are written in standard
|
|
27
|
+
C99 and have no external dependencies. They have been tested with
|
|
28
|
+
MSVC, gcc, tcc, and clang.
|
|
29
|
+
|
|
30
|
+
- **Fast.** cmark can render a Markdown version of *War and Peace* in
|
|
31
|
+
the blink of an eye (127 milliseconds on a ten year old laptop,
|
|
32
|
+
vs. 100-400 milliseconds for an eye blink). In our [benchmarks],
|
|
33
|
+
cmark is 10,000 times faster than the original `Markdown.pl`, and
|
|
34
|
+
on par with the very fastest available Markdown processors.
|
|
35
|
+
|
|
36
|
+
- **Accurate.** The library passes all CommonMark conformance tests.
|
|
37
|
+
|
|
38
|
+
- **Standardized.** The library can be expected to parse CommonMark
|
|
39
|
+
the same way as any other conforming parser. So, for example,
|
|
40
|
+
you can use `commonmark.js` on the client to preview content that
|
|
41
|
+
will be rendered on the server using `cmark`.
|
|
42
|
+
|
|
43
|
+
- **Robust.** The library has been extensively fuzz-tested using
|
|
44
|
+
[american fuzzy lop]. The test suite includes pathological cases
|
|
45
|
+
that bring many other Markdown parsers to a crawl (for example,
|
|
46
|
+
thousands-deep nested bracketed text or block quotes).
|
|
47
|
+
|
|
48
|
+
- **Flexible.** CommonMark input is parsed to an AST which can be
|
|
49
|
+
manipulated programmatically prior to rendering.
|
|
50
|
+
|
|
51
|
+
- **Multiple renderers.** Output in HTML, groff man, LaTeX, CommonMark,
|
|
52
|
+
and a custom XML format is supported. And it is easy to write new
|
|
53
|
+
renderers to support other formats.
|
|
54
|
+
|
|
55
|
+
- **Free.** BSD2-licensed.
|
|
56
|
+
|
|
57
|
+
It is easy to use `libcmark` in python, lua, ruby, and other dynamic
|
|
58
|
+
languages: see the `wrappers/` subdirectory for some simple examples.
|
|
59
|
+
|
|
60
|
+
There are also libraries that wrap `libcmark` for
|
|
61
|
+
[Go](https://github.com/rhinoman/go-commonmark),
|
|
62
|
+
[Haskell](https://hackage.haskell.org/package/cmark),
|
|
63
|
+
[Ruby](https://github.com/gjtorikian/commonmarker),
|
|
64
|
+
[Lua](https://github.com/jgm/cmark-lua),
|
|
65
|
+
[Perl](https://metacpan.org/release/CommonMark),
|
|
66
|
+
[Python](https://pypi.python.org/pypi/paka.cmark),
|
|
67
|
+
[R](https://cran.r-project.org/package=commonmark),
|
|
68
|
+
[Tcl](https://github.com/apnadkarni/tcl-cmark),
|
|
69
|
+
[Scala](https://github.com/sparsetech/cmark-scala) and
|
|
70
|
+
[Node.js](https://github.com/killa123/node-cmark).
|
|
71
|
+
|
|
72
|
+
Installing
|
|
73
|
+
----------
|
|
74
|
+
|
|
75
|
+
Building the C program (`cmark`) and shared library (`libcmark`)
|
|
76
|
+
requires [cmake]. If you modify `scanners.re`, then you will also
|
|
77
|
+
need [re2c] \(>= 0.14.2\), which is used to generate `scanners.c` from
|
|
78
|
+
`scanners.re`. We have included a pre-generated `scanners.c` in
|
|
79
|
+
the repository to reduce build dependencies.
|
|
80
|
+
|
|
81
|
+
If you have GNU make, you can simply `make`, `make test`, and `make
|
|
82
|
+
install`. This calls [cmake] to create a `Makefile` in the `build`
|
|
83
|
+
directory, then uses that `Makefile` to create the executable and
|
|
84
|
+
library. The binaries can be found in `build/src`. The default
|
|
85
|
+
installation prefix is `/usr/local`. To change the installation
|
|
86
|
+
prefix, pass the `INSTALL_PREFIX` variable if you run `make` for the
|
|
87
|
+
first time: `make INSTALL_PREFIX=path`.
|
|
88
|
+
|
|
89
|
+
For a more portable method, you can use [cmake] manually. [cmake] knows
|
|
90
|
+
how to create build environments for many build systems. For example,
|
|
91
|
+
on FreeBSD:
|
|
92
|
+
|
|
93
|
+
mkdir build
|
|
94
|
+
cd build
|
|
95
|
+
cmake .. # optionally: -DCMAKE_INSTALL_PREFIX=path
|
|
96
|
+
make # executable will be created as build/src/cmark
|
|
97
|
+
make test
|
|
98
|
+
make install
|
|
99
|
+
|
|
100
|
+
Or, to create Xcode project files on OSX:
|
|
101
|
+
|
|
102
|
+
mkdir build
|
|
103
|
+
cd build
|
|
104
|
+
cmake -G Xcode ..
|
|
105
|
+
open cmark.xcodeproj
|
|
106
|
+
|
|
107
|
+
The GNU Makefile also provides a few other targets for developers.
|
|
108
|
+
To run a benchmark:
|
|
109
|
+
|
|
110
|
+
make bench
|
|
111
|
+
|
|
112
|
+
For more detailed benchmarks:
|
|
113
|
+
|
|
114
|
+
make newbench
|
|
115
|
+
|
|
116
|
+
To run a test for memory leaks using `valgrind`:
|
|
117
|
+
|
|
118
|
+
make leakcheck
|
|
119
|
+
|
|
120
|
+
To reformat source code using `clang-format`:
|
|
121
|
+
|
|
122
|
+
make format
|
|
123
|
+
|
|
124
|
+
To run a "fuzz test" against ten long randomly generated inputs:
|
|
125
|
+
|
|
126
|
+
make fuzztest
|
|
127
|
+
|
|
128
|
+
To do a more systematic fuzz test with [american fuzzy lop]:
|
|
129
|
+
|
|
130
|
+
AFL_PATH=/path/to/afl_directory make afl
|
|
131
|
+
|
|
132
|
+
Fuzzing with [libFuzzer] is also supported but, because libFuzzer is still
|
|
133
|
+
under active development, may not work with your system-installed version of
|
|
134
|
+
clang. Assuming LLVM has been built in `$HOME/src/llvm/build` the fuzzer can be
|
|
135
|
+
run with:
|
|
136
|
+
|
|
137
|
+
CC="$HOME/src/llvm/build/bin/clang" LIB_FUZZER_PATH="$HOME/src/llvm/lib/Fuzzer/libFuzzer.a" make libFuzzer
|
|
138
|
+
|
|
139
|
+
To make a release tarball and zip archive:
|
|
140
|
+
|
|
141
|
+
make archive
|
|
142
|
+
|
|
143
|
+
Installing (Windows)
|
|
144
|
+
--------------------
|
|
145
|
+
|
|
146
|
+
To compile with MSVC and NMAKE:
|
|
147
|
+
|
|
148
|
+
nmake
|
|
149
|
+
|
|
150
|
+
You can cross-compile a Windows binary and dll on linux if you have the
|
|
151
|
+
`mingw32` compiler:
|
|
152
|
+
|
|
153
|
+
make mingw
|
|
154
|
+
|
|
155
|
+
The binaries will be in `build-mingw/windows/bin`.
|
|
156
|
+
|
|
157
|
+
Usage
|
|
158
|
+
-----
|
|
159
|
+
|
|
160
|
+
Instructions for the use of the command line program and library can
|
|
161
|
+
be found in the man pages in the `man` subdirectory.
|
|
162
|
+
|
|
163
|
+
Security
|
|
164
|
+
--------
|
|
165
|
+
|
|
166
|
+
By default, the library will scrub raw HTML and potentially
|
|
167
|
+
dangerous links (`javascript:`, `vbscript:`, `data:`, `file:`).
|
|
168
|
+
|
|
169
|
+
To allow these, use the option `CMARK_OPT_UNSAFE` (or
|
|
170
|
+
`--unsafe`) with the command line program. If doing so, we
|
|
171
|
+
recommend you use a HTML sanitizer specific to your needs to
|
|
172
|
+
protect against [XSS
|
|
173
|
+
attacks](http://en.wikipedia.org/wiki/Cross-site_scripting).
|
|
174
|
+
|
|
175
|
+
Contributing
|
|
176
|
+
------------
|
|
177
|
+
|
|
178
|
+
There is a [forum for discussing
|
|
179
|
+
CommonMark](http://talk.commonmark.org); you should use it instead of
|
|
180
|
+
github issues for questions and possibly open-ended discussions.
|
|
181
|
+
Use the [github issue tracker](http://github.com/commonmark/CommonMark/issues)
|
|
182
|
+
only for simple, clear, actionable issues.
|
|
183
|
+
|
|
184
|
+
Authors
|
|
185
|
+
-------
|
|
186
|
+
|
|
187
|
+
John MacFarlane wrote the original library and program.
|
|
188
|
+
The block parsing algorithm was worked out together with David
|
|
189
|
+
Greenspan. Vicent Marti optimized the C implementation for
|
|
190
|
+
performance, increasing its speed tenfold. Kārlis Gaņģis helped
|
|
191
|
+
work out a better parsing algorithm for links and emphasis,
|
|
192
|
+
eliminating several worst-case performance issues.
|
|
193
|
+
Nick Wellnhofer contributed many improvements, including
|
|
194
|
+
most of the C library's API and its test harness.
|
|
195
|
+
|
|
196
|
+
[benchmarks]: benchmarks.md
|
|
197
|
+
[the spec]: https://github.github.com/gfm/
|
|
198
|
+
[the upstream implementation]: https://github.com/jgm/cmark
|
|
199
|
+
[CommonMark]: http://commonmark.org
|
|
200
|
+
[cmake]: http://www.cmake.org/download/
|
|
201
|
+
[re2c]: http://re2c.org
|
|
202
|
+
[commonmark.js]: https://github.com/commonmark/commonmark.js
|
|
203
|
+
[Build Status]: https://img.shields.io/travis/github/cmark-gfm/master.svg?style=flat
|
|
204
|
+
[Windows Build Status]: https://ci.appveyor.com/api/projects/status/wv7ifhqhv5itm3d5?svg=true
|
|
205
|
+
[american fuzzy lop]: http://lcamtuf.coredump.cx/afl/
|
|
206
|
+
[libFuzzer]: http://llvm.org/docs/LibFuzzer.html
|