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,803 @@
|
|
|
1
|
+
# Apex User Guide
|
|
2
|
+
|
|
3
|
+
**Version 0.1.0**
|
|
4
|
+
|
|
5
|
+
Apex is a unified Markdown processor that combines the best
|
|
6
|
+
features of CommonMark, GitHub Flavored Markdown,
|
|
7
|
+
MultiMarkdown, and Kramdown into a single, fast, C-based
|
|
8
|
+
processor.
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
### Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Build from source
|
|
16
|
+
git clone [apex-repo-url]
|
|
17
|
+
cd apex
|
|
18
|
+
mkdir build && cd build
|
|
19
|
+
cmake ..
|
|
20
|
+
make
|
|
21
|
+
sudo make install
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Basic Usage
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Convert a file
|
|
29
|
+
apex document.md > output.html
|
|
30
|
+
|
|
31
|
+
# From stdin
|
|
32
|
+
cat document.md | apex > output.html
|
|
33
|
+
|
|
34
|
+
# Specify processor mode
|
|
35
|
+
apex --mode gfm document.md
|
|
36
|
+
apex --mode multimarkdown document.md
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Processor Modes
|
|
41
|
+
|
|
42
|
+
Apex supports multiple processor modes for compatibility
|
|
43
|
+
with different Markdown flavors:
|
|
44
|
+
|
|
45
|
+
### CommonMark Mode (`--mode commonmark`)
|
|
46
|
+
|
|
47
|
+
Pure CommonMark specification compliance. No extensions.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
apex --mode commonmark document.md
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### GFM Mode (`--mode gfm`)
|
|
55
|
+
|
|
56
|
+
GitHub Flavored Markdown with:
|
|
57
|
+
|
|
58
|
+
- Tables
|
|
59
|
+
- Strikethrough (~~text~~)
|
|
60
|
+
- Task lists (- [ ] Todo)
|
|
61
|
+
- Autolinks
|
|
62
|
+
- Hard line breaks
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
apex --mode gfm document.md
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### MultiMarkdown Mode (`--mode multimarkdown` or `--mode mmd`)
|
|
70
|
+
|
|
71
|
+
MultiMarkdown compatibility with:
|
|
72
|
+
|
|
73
|
+
- Metadata blocks (YAML, MMD format)
|
|
74
|
+
- Metadata variables `[%key]`
|
|
75
|
+
- Footnotes
|
|
76
|
+
- Tables
|
|
77
|
+
- Smart typography
|
|
78
|
+
- Math support
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
apex --mode mmd document.md
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Kramdown Mode (`--mode kramdown`)
|
|
86
|
+
|
|
87
|
+
Kramdown compatibility with:
|
|
88
|
+
|
|
89
|
+
- Attributes `{: #id .class}`
|
|
90
|
+
- Definition lists
|
|
91
|
+
- Footnotes
|
|
92
|
+
- Smart typography
|
|
93
|
+
- Math support
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
apex --mode kramdown document.md
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Unified Mode (`--mode unified`, default)
|
|
101
|
+
|
|
102
|
+
All features enabled - the superset of all modes.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
apex document.md
|
|
106
|
+
# or explicitly:
|
|
107
|
+
apex --mode unified document.md
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Features
|
|
112
|
+
|
|
113
|
+
### Metadata Blocks
|
|
114
|
+
|
|
115
|
+
Apex supports three metadata formats:
|
|
116
|
+
|
|
117
|
+
**YAML Front Matter:**
|
|
118
|
+
```yaml
|
|
119
|
+
---
|
|
120
|
+
title: My Document
|
|
121
|
+
author: John Doe
|
|
122
|
+
date: 2025-12-04
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**MultiMarkdown Metadata:**
|
|
128
|
+
```
|
|
129
|
+
Title: My Document
|
|
130
|
+
Author: John Doe
|
|
131
|
+
Date: 2025-12-04
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Pandoc Title Blocks:**
|
|
136
|
+
```
|
|
137
|
+
% My Document
|
|
138
|
+
% John Doe
|
|
139
|
+
% 2025-12-04
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Metadata Variables
|
|
144
|
+
|
|
145
|
+
Use `[%key]` to insert metadata values anywhere in your
|
|
146
|
+
document:
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
---
|
|
150
|
+
title: Apex User Guide
|
|
151
|
+
version: 0.1.0
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
# [%title]
|
|
155
|
+
|
|
156
|
+
Version: [%version]
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Renders as:
|
|
161
|
+
```html
|
|
162
|
+
<h1>Apex User Guide</h1>
|
|
163
|
+
<p>Version: 0.1.0</p>
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Wiki Links
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
[[Page Name]] # Link to page
|
|
171
|
+
[[Page Name|Display Text]] # Custom display
|
|
172
|
+
[[Page Name#Section]] # Link to section
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Math Support
|
|
177
|
+
|
|
178
|
+
**Inline math:**
|
|
179
|
+
```markdown
|
|
180
|
+
The equation $E = mc^2$ is famous.
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Display math:**
|
|
185
|
+
```markdown
|
|
186
|
+
$$
|
|
187
|
+
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
|
|
188
|
+
$$
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Math is wrapped in spans with appropriate classes for
|
|
193
|
+
MathJax or KaTeX to render.
|
|
194
|
+
|
|
195
|
+
### Critic Markup
|
|
196
|
+
|
|
197
|
+
Track changes and annotations with three processing modes:
|
|
198
|
+
|
|
199
|
+
**Markup Mode (default)** - Show changes with HTML tags:
|
|
200
|
+
```markdown
|
|
201
|
+
{++addition++} # Added text → <ins>addition</ins>
|
|
202
|
+
{--deletion--} # Deleted text → <del>deletion</del>
|
|
203
|
+
{~~old text~>new text~~} # Substitution → <del>old</del><ins>new</ins>
|
|
204
|
+
{==highlighted==} # Highlighted text → <mark>highlighted</mark>
|
|
205
|
+
{>>comment text<<} # Comment → <span class="comment">comment</span>
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Accept Mode** (`--accept`) - Apply all changes, output
|
|
210
|
+
clean text:
|
|
211
|
+
```bash
|
|
212
|
+
apex --accept document.md
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
- Additions: kept
|
|
217
|
+
- Deletions: removed
|
|
218
|
+
- Substitutions: new text kept
|
|
219
|
+
- Highlights: text kept (markup removed)
|
|
220
|
+
- Comments: removed
|
|
221
|
+
|
|
222
|
+
**Reject Mode** (`--reject`) - Revert all changes, restore
|
|
223
|
+
original:
|
|
224
|
+
```bash
|
|
225
|
+
apex --reject document.md
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
- Additions: removed
|
|
230
|
+
- Deletions: kept
|
|
231
|
+
- Substitutions: old text kept
|
|
232
|
+
- Highlights: text kept (markup removed)
|
|
233
|
+
- Comments: removed
|
|
234
|
+
|
|
235
|
+
**Use cases**:
|
|
236
|
+
|
|
237
|
+
- Review: `apex document.md` (show all markup)
|
|
238
|
+
- Publish: `apex --accept document.md` (final version)
|
|
239
|
+
- Rollback: `apex --reject document.md` (original version)
|
|
240
|
+
|
|
241
|
+
### Tables
|
|
242
|
+
|
|
243
|
+
GitHub Flavored Markdown tables:
|
|
244
|
+
|
|
245
|
+
```markdown
|
|
246
|
+
| Header 1 | Header 2 |
|
|
247
|
+
| -------- | -------- |
|
|
248
|
+
| Cell 1 | Cell 2 |
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
#### Inline tables from CSV/TSV
|
|
253
|
+
|
|
254
|
+
You can turn inline CSV/TSV text into Markdown tables by
|
|
255
|
+
using a fenced code
|
|
256
|
+
block with the info string `table`. The delimiter is
|
|
257
|
+
detected automatically:
|
|
258
|
+
|
|
259
|
+
- If any non-blank line contains a tab, the block is treated
|
|
260
|
+
|
|
261
|
+
as TSV.
|
|
262
|
+
|
|
263
|
+
- Otherwise, if any non-blank line contains a comma, the
|
|
264
|
+
|
|
265
|
+
block is treated as CSV.
|
|
266
|
+
|
|
267
|
+
- If no tabs or commas are found, the block is left
|
|
268
|
+
|
|
269
|
+
unchanged as a normal
|
|
270
|
+
`table`-info fenced code block.
|
|
271
|
+
|
|
272
|
+
```table
|
|
273
|
+
header 1,header 2,header 3
|
|
274
|
+
data 1,data 2,data 3
|
|
275
|
+
,,data 2c
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Optionally, you can use an HTML comment marker to indicate
|
|
280
|
+
that the following
|
|
281
|
+
non-blank lines up to the next blank line should be treated
|
|
282
|
+
as CSV/TSV data:
|
|
283
|
+
|
|
284
|
+
```markdown
|
|
285
|
+
<!--TABLE-->
|
|
286
|
+
header 1,header 2,header 3
|
|
287
|
+
data 1,data 2,data 3
|
|
288
|
+
,,data 2c
|
|
289
|
+
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
The same delimiter-detection rules apply to `<!--TABLE-->`
|
|
293
|
+
blocks.
|
|
294
|
+
|
|
295
|
+
### Task Lists
|
|
296
|
+
|
|
297
|
+
```markdown
|
|
298
|
+
- [ ] Todo item
|
|
299
|
+
- [x] Completed item
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Footnotes
|
|
304
|
+
|
|
305
|
+
**Reference-style footnotes**:
|
|
306
|
+
```markdown
|
|
307
|
+
Here's a footnote[^1].
|
|
308
|
+
|
|
309
|
+
[^1]: This is the footnote content.
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
**Kramdown inline footnotes**:
|
|
314
|
+
```markdown
|
|
315
|
+
This is a footnote^[inline content here] in the text.
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**MultiMarkdown inline footnotes**:
|
|
320
|
+
```markdown
|
|
321
|
+
This is a footnote[^inline content with spaces] in the text.
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
All styles produce properly formatted footnote sections with
|
|
326
|
+
backlinks.
|
|
327
|
+
|
|
328
|
+
### Abbreviations
|
|
329
|
+
|
|
330
|
+
**Classic MMD syntax** (automatic replacement):
|
|
331
|
+
```markdown
|
|
332
|
+
*[HTML]: Hypertext Markup Language
|
|
333
|
+
*[CSS]: Cascading Style Sheets
|
|
334
|
+
|
|
335
|
+
HTML and CSS are essential.
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
**MMD 6 reference syntax**:
|
|
340
|
+
```markdown
|
|
341
|
+
[>MMD]: MultiMarkdown
|
|
342
|
+
|
|
343
|
+
Using [>MMD] here and [>MMD] again.
|
|
344
|
+
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
**MMD 6 inline syntax** (no definition needed):
|
|
348
|
+
```markdown
|
|
349
|
+
This is [>(MD) Markdown] and [>(CSS) Cascading Style Sheets].
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
All produce `<abbr title="expansion">abbr</abbr>` tags.
|
|
354
|
+
|
|
355
|
+
### Definition Lists
|
|
356
|
+
|
|
357
|
+
Kramdown/PHP Markdown Extra syntax:
|
|
358
|
+
```markdown
|
|
359
|
+
Term
|
|
360
|
+
: Definition text with **Markdown** support
|
|
361
|
+
|
|
362
|
+
Apple
|
|
363
|
+
: A fruit
|
|
364
|
+
: A company
|
|
365
|
+
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Renders as proper `<dl>`, `<dt>`, `<dd>` HTML.
|
|
369
|
+
|
|
370
|
+
### Inline Attribute Lists (IAL)
|
|
371
|
+
|
|
372
|
+
Kramdown syntax for adding attributes to elements:
|
|
373
|
+
```markdown
|
|
374
|
+
# Header {: #custom-id}
|
|
375
|
+
|
|
376
|
+
Paragraph with class.
|
|
377
|
+
{: .important}
|
|
378
|
+
|
|
379
|
+
## Another Header {: #section-2 .highlight}
|
|
380
|
+
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Callouts
|
|
384
|
+
|
|
385
|
+
Bear/Obsidian syntax:
|
|
386
|
+
```markdown
|
|
387
|
+
> [!NOTE] Title
|
|
388
|
+
> This is a note callout
|
|
389
|
+
|
|
390
|
+
> [!WARNING] Be Careful
|
|
391
|
+
> Warning content
|
|
392
|
+
|
|
393
|
+
> [!TIP] Pro Tip
|
|
394
|
+
> Helpful advice
|
|
395
|
+
|
|
396
|
+
> [!DANGER] Critical
|
|
397
|
+
> Dangerous operation
|
|
398
|
+
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
Collapsible callouts:
|
|
402
|
+
```markdown
|
|
403
|
+
> [!NOTE]+ Expandable
|
|
404
|
+
> Click to expand
|
|
405
|
+
|
|
406
|
+
> [!NOTE]- Collapsed
|
|
407
|
+
> Starts collapsed
|
|
408
|
+
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### File Includes
|
|
412
|
+
|
|
413
|
+
**Marked syntax**:
|
|
414
|
+
```markdown
|
|
415
|
+
<<[file.md] # Include and process Markdown
|
|
416
|
+
<<(code.py) # Include as code block
|
|
417
|
+
<<{raw.html} # Include raw HTML
|
|
418
|
+
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**MultiMarkdown transclusion**:
|
|
422
|
+
```markdown
|
|
423
|
+
{{file.md}} # Include file
|
|
424
|
+
{{*.md}} # Wildcard include
|
|
425
|
+
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
**iA Writer syntax**:
|
|
429
|
+
```markdown
|
|
430
|
+
/image.png # Intelligent include (detects type)
|
|
431
|
+
/code.py # Auto-detects as code block
|
|
432
|
+
/document.md # Auto-detects as Markdown
|
|
433
|
+
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
CSV and TSV files automatically convert to tables!
|
|
437
|
+
|
|
438
|
+
### Table of Contents
|
|
439
|
+
|
|
440
|
+
Multiple marker formats:
|
|
441
|
+
```markdown
|
|
442
|
+
<!--TOC--> # Basic TOC
|
|
443
|
+
<!--TOC max2 min1--> # With depth control
|
|
444
|
+
{{TOC}} # MMD style
|
|
445
|
+
{{TOC:2-4}} # With range
|
|
446
|
+
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
### Advanced Tables
|
|
450
|
+
|
|
451
|
+
**Rowspan** (cells spanning multiple rows):
|
|
452
|
+
```markdown
|
|
453
|
+
| A | B |
|
|
454
|
+
| --- | --- |
|
|
455
|
+
| C | D |
|
|
456
|
+
| ^^ | E |
|
|
457
|
+
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
Cell C spans 2 rows (using `^^` marker).
|
|
461
|
+
|
|
462
|
+
**Colspan** (cells spanning multiple columns):
|
|
463
|
+
```markdown
|
|
464
|
+
| A | B | C |
|
|
465
|
+
| --- | --- | --- |
|
|
466
|
+
| D | | |
|
|
467
|
+
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Empty cells merge with previous cell.
|
|
471
|
+
|
|
472
|
+
**Table captions**:
|
|
473
|
+
```markdown
|
|
474
|
+
[Table Caption]
|
|
475
|
+
|
|
476
|
+
| A | B |
|
|
477
|
+
| --- | --- |
|
|
478
|
+
| C | D |
|
|
479
|
+
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### Special Markers
|
|
483
|
+
|
|
484
|
+
**Page breaks**:
|
|
485
|
+
```markdown
|
|
486
|
+
<!--BREAK--> # HTML comment style
|
|
487
|
+
{::pagebreak /} # Kramdown style
|
|
488
|
+
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
**Autoscroll pauses** (for Marked's teleprompter mode):
|
|
492
|
+
```markdown
|
|
493
|
+
<!--PAUSE:5--> # Pause for 5 seconds
|
|
494
|
+
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
**End-of-block marker**:
|
|
498
|
+
```markdown
|
|
499
|
+
- Item 1
|
|
500
|
+
|
|
501
|
+
^
|
|
502
|
+
|
|
503
|
+
- Item 2
|
|
504
|
+
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
Forces list separation.
|
|
508
|
+
|
|
509
|
+
### GitHub Emoji
|
|
510
|
+
|
|
511
|
+
```markdown
|
|
512
|
+
Success! :rocket: :tada: :sparkles:
|
|
513
|
+
I :heart: Markdown!
|
|
514
|
+
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
Supports 350+ GitHub emoji, converted to Unicode characters.
|
|
518
|
+
|
|
519
|
+
## Command-Line Options
|
|
520
|
+
|
|
521
|
+
```
|
|
522
|
+
apex [options] [file]
|
|
523
|
+
|
|
524
|
+
Options:
|
|
525
|
+
-m, --mode MODE Processor mode: commonmark, gfm, mmd, kramdown, unified
|
|
526
|
+
-o, --output FILE Write output to FILE
|
|
527
|
+
-s, --standalone Generate complete HTML document (with <html>, <head>, <body>)
|
|
528
|
+
--style FILE Link to CSS file in document head (implies --standalone)
|
|
529
|
+
--title TITLE Document title (for standalone mode, default: "Document")
|
|
530
|
+
--pretty Pretty-print HTML with indentation and whitespace
|
|
531
|
+
--accept Accept all Critic Markup changes (apply edits)
|
|
532
|
+
--reject Reject all Critic Markup changes (revert edits)
|
|
533
|
+
--no-tables Disable table support
|
|
534
|
+
--no-footnotes Disable footnote support
|
|
535
|
+
--no-smart Disable smart typography
|
|
536
|
+
--no-math Disable math support
|
|
537
|
+
--[no-]includes Enable file inclusion (enabled by default in unified mode)
|
|
538
|
+
--hardbreaks Treat newlines as hard breaks
|
|
539
|
+
-h, --help Show help
|
|
540
|
+
-v, --version Show version
|
|
541
|
+
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
### Output Modes
|
|
545
|
+
|
|
546
|
+
**Fragment Mode (default)**: Outputs HTML body content only
|
|
547
|
+
```bash
|
|
548
|
+
apex document.md # Compact HTML fragment
|
|
549
|
+
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
**Pretty Mode**: Formatted HTML with indentation
|
|
553
|
+
```bash
|
|
554
|
+
apex --pretty document.md # Readable, indented HTML
|
|
555
|
+
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
**Standalone Mode**: Complete HTML5 document
|
|
559
|
+
```bash
|
|
560
|
+
apex --standalone document.md
|
|
561
|
+
apex -s --title "My Doc" --style styles.css document.md
|
|
562
|
+
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
**Combined**: Beautiful complete documents
|
|
566
|
+
```bash
|
|
567
|
+
apex -s --pretty --title "Report" --style report.css doc.md
|
|
568
|
+
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
## Library Usage
|
|
572
|
+
|
|
573
|
+
### C API
|
|
574
|
+
|
|
575
|
+
```c
|
|
576
|
+
#include <apex/apex.h>
|
|
577
|
+
|
|
578
|
+
// Get default options
|
|
579
|
+
apex_options options = apex_options_default();
|
|
580
|
+
|
|
581
|
+
// Or get mode-specific options
|
|
582
|
+
apex_options gfm_opts = apex_options_for_mode(APEX_MODE_GFM);
|
|
583
|
+
|
|
584
|
+
// Convert
|
|
585
|
+
const char *markdown = "# Hello\n\n**World**";
|
|
586
|
+
char *html = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
587
|
+
|
|
588
|
+
// Use html...
|
|
589
|
+
printf("%s\n", html);
|
|
590
|
+
|
|
591
|
+
// Clean up
|
|
592
|
+
apex_free_string(html);
|
|
593
|
+
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### Objective-C (for Marked integration)
|
|
597
|
+
|
|
598
|
+
```objective-c
|
|
599
|
+
#import <NSString+Apex.h>
|
|
600
|
+
|
|
601
|
+
// Convert with default unified mode
|
|
602
|
+
NSString *html = [NSString convertWithApex:markdown];
|
|
603
|
+
|
|
604
|
+
// Convert with specific mode
|
|
605
|
+
NSString *gfmHtml = [NSString convertWithApex:markdown mode:@"gfm"];
|
|
606
|
+
NSString *mmdHtml = [NSString convertWithApex:markdown mode:@"multimarkdown"];
|
|
607
|
+
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
## Performance
|
|
611
|
+
|
|
612
|
+
Apex is built on cmark-gfm, which is highly optimized:
|
|
613
|
+
|
|
614
|
+
- **Small documents (< 10KB)**: < 10ms
|
|
615
|
+
- **Medium documents (< 100KB)**: < 100ms
|
|
616
|
+
- **Large documents (< 1MB)**: < 1s
|
|
617
|
+
|
|
618
|
+
## Compatibility
|
|
619
|
+
|
|
620
|
+
### With MultiMarkdown
|
|
621
|
+
|
|
622
|
+
- ✅ Metadata blocks (YAML, MMD, Pandoc formats)
|
|
623
|
+
- ✅ Metadata variables `[%key]`
|
|
624
|
+
- ✅ Tables (including advanced features)
|
|
625
|
+
- ✅ Smart typography
|
|
626
|
+
- ✅ Math support ($...$ and $$...$$)
|
|
627
|
+
- ✅ File includes / transclusion (`{{file}}`)
|
|
628
|
+
- ✅ Definition lists
|
|
629
|
+
- ✅ Footnotes (reference and inline)
|
|
630
|
+
- ✅ Abbreviations (classic and MMD 6 syntax)
|
|
631
|
+
|
|
632
|
+
### With GitHub Flavored Markdown
|
|
633
|
+
|
|
634
|
+
- ✅ Tables
|
|
635
|
+
- ✅ Strikethrough (~~text~~)
|
|
636
|
+
- ✅ Task lists (- [ ] / - [x])
|
|
637
|
+
- ✅ Autolinks
|
|
638
|
+
- ✅ Hard line breaks (in GFM mode)
|
|
639
|
+
- ✅ Emoji (:emoji_name:)
|
|
640
|
+
|
|
641
|
+
### With Kramdown
|
|
642
|
+
|
|
643
|
+
- ✅ Smart typography
|
|
644
|
+
- ✅ Math support
|
|
645
|
+
- ✅ Footnotes (reference and inline ^[text])
|
|
646
|
+
- ✅ Inline Attribute Lists `{: #id .class}`
|
|
647
|
+
- ✅ Attribute List Definitions `{:ref: attrs}`
|
|
648
|
+
- ✅ Definition lists (: syntax)
|
|
649
|
+
- ✅ End-of-block markers (^)
|
|
650
|
+
|
|
651
|
+
### With Marked (Special Syntax)
|
|
652
|
+
|
|
653
|
+
- ✅ Callouts (Bear/Obsidian/Xcode styles)
|
|
654
|
+
- ✅ File includes (<<[md], <<(code), <<{html})
|
|
655
|
+
- ✅ Table of Contents markers
|
|
656
|
+
- ✅ Page breaks (<!--BREAK-->)
|
|
657
|
+
- ✅ Autoscroll pauses (<!--PAUSE:N-->)
|
|
658
|
+
- ✅ Wiki links ([[Page]])
|
|
659
|
+
|
|
660
|
+
### With iA Writer
|
|
661
|
+
|
|
662
|
+
- ✅ File transclusion (/filename with auto-detection)
|
|
663
|
+
- ✅ Image includes
|
|
664
|
+
- ✅ Code includes
|
|
665
|
+
- ✅ CSV/TSV to table conversion
|
|
666
|
+
|
|
667
|
+
### With CommonMark
|
|
668
|
+
|
|
669
|
+
- ✅ Full specification compliance
|
|
670
|
+
- ✅ All standard syntax
|
|
671
|
+
- ✅ Strict parsing when in CommonMark mode
|
|
672
|
+
|
|
673
|
+
## Standalone HTML Documents
|
|
674
|
+
|
|
675
|
+
Generate complete, self-contained HTML5 documents:
|
|
676
|
+
|
|
677
|
+
```bash
|
|
678
|
+
# Basic standalone document
|
|
679
|
+
apex --standalone document.md
|
|
680
|
+
|
|
681
|
+
# With custom title and CSS
|
|
682
|
+
apex -s --title "My Report" --style report.css doc.md -o report.html
|
|
683
|
+
|
|
684
|
+
# Pretty-formatted complete document
|
|
685
|
+
apex -s --pretty --title "Beautiful Doc" doc.md
|
|
686
|
+
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
**Features**:
|
|
690
|
+
|
|
691
|
+
- Complete HTML5 structure (<!DOCTYPE html>, <head>, <body>)
|
|
692
|
+
- UTF-8 charset and responsive viewport
|
|
693
|
+
- Custom document titles
|
|
694
|
+
- External CSS linking or beautiful default inline styles
|
|
695
|
+
|
|
696
|
+
Perfect for: documentation, reports, blogs, standalone files
|
|
697
|
+
|
|
698
|
+
**Default styles include**:
|
|
699
|
+
|
|
700
|
+
- Modern system font stack
|
|
701
|
+
- Responsive centered layout (800px max-width)
|
|
702
|
+
- Code block and table styling
|
|
703
|
+
- Callout formatting
|
|
704
|
+
- Print styles for page breaks
|
|
705
|
+
|
|
706
|
+
## Pretty-Print HTML
|
|
707
|
+
|
|
708
|
+
Format HTML with proper indentation for readability:
|
|
709
|
+
|
|
710
|
+
```bash
|
|
711
|
+
# Pretty fragment
|
|
712
|
+
apex --pretty document.md
|
|
713
|
+
|
|
714
|
+
# Pretty standalone
|
|
715
|
+
apex -s --pretty document.md
|
|
716
|
+
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
**Features**:
|
|
720
|
+
|
|
721
|
+
- 2-space indentation per nesting level
|
|
722
|
+
- Block elements on separate lines
|
|
723
|
+
- Inline elements preserved inline
|
|
724
|
+
- Perfect for: debugging, source viewing, version control
|
|
725
|
+
|
|
726
|
+
## Examples
|
|
727
|
+
|
|
728
|
+
### Complete Document Example
|
|
729
|
+
|
|
730
|
+
```markdown
|
|
731
|
+
---
|
|
732
|
+
title: Example Document
|
|
733
|
+
author: Brett Terpstra
|
|
734
|
+
date: 2025-12-04
|
|
735
|
+
---
|
|
736
|
+
|
|
737
|
+
# [%title]
|
|
738
|
+
|
|
739
|
+
By [%author], updated [%date]
|
|
740
|
+
|
|
741
|
+
## Features
|
|
742
|
+
|
|
743
|
+
This document demonstrates **bold**, *italic*, and ~~strikethrough~~.
|
|
744
|
+
|
|
745
|
+
### Math
|
|
746
|
+
|
|
747
|
+
The famous equation: $E = mc^2$
|
|
748
|
+
|
|
749
|
+
### Code
|
|
750
|
+
|
|
751
|
+
```python
|
|
752
|
+
|
|
753
|
+
def hello():
|
|
754
|
+
print("Hello, World!")
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
### Task List
|
|
758
|
+
|
|
759
|
+
- [x] Complete documentation
|
|
760
|
+
- [ ] Add more examples
|
|
761
|
+
|
|
762
|
+
### Wiki Links
|
|
763
|
+
|
|
764
|
+
See [[HomePage]] or [[API#Methods|API Documentation]].
|
|
765
|
+
|
|
766
|
+
### Critic Markup
|
|
767
|
+
|
|
768
|
+
Original text {~~with changes~>and improvements~~}.
|
|
769
|
+
|
|
770
|
+
New {++addition++} and {--removal--}.
|
|
771
|
+
|
|
772
|
+
{==Important note==} to highlight.
|
|
773
|
+
|
|
774
|
+
### Footnotes
|
|
775
|
+
|
|
776
|
+
This has a footnote[^1].
|
|
777
|
+
|
|
778
|
+
[^1]: Footnote content here.
|
|
779
|
+
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
## Troubleshooting
|
|
783
|
+
|
|
784
|
+
**Math not rendering**: Ensure MathJax or KaTeX is loaded in
|
|
785
|
+
your HTML template
|
|
786
|
+
|
|
787
|
+
**Wiki links as plain text**: Make sure `--mode unified` is
|
|
788
|
+
set or wiki links are enabled
|
|
789
|
+
|
|
790
|
+
**Critic markup not showing**: Verify `enable_critic_markup` is true in unified mode
|
|
791
|
+
|
|
792
|
+
## Getting Help
|
|
793
|
+
|
|
794
|
+
- GitHub Issues: [repo-url]/issues
|
|
795
|
+
- Documentation: See `docs/` directory
|
|
796
|
+
- Examples: See `tests/` directory
|
|
797
|
+
|
|
798
|
+
## License
|
|
799
|
+
|
|
800
|
+
BSD 2-Clause License
|
|
801
|
+
|
|
802
|
+
Copyright (c) 2025 Brett Terpstra
|
|
803
|
+
|