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,332 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NSString+Apex.m
|
|
3
|
+
* Implementation of Apex Markdown processor integration
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#import "NSString+Apex.h"
|
|
7
|
+
#import <apex/apex.h>
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Apex mode constants
|
|
11
|
+
*/
|
|
12
|
+
NSString *const ApexModeCommonmark = @"commonmark";
|
|
13
|
+
NSString *const ApexModeGFM = @"gfm";
|
|
14
|
+
NSString *const ApexModeMultiMarkdown = @"multimarkdown";
|
|
15
|
+
NSString *const ApexModeKramdown = @"kramdown";
|
|
16
|
+
NSString *const ApexModeUnified = @"unified";
|
|
17
|
+
|
|
18
|
+
@implementation NSString (Apex)
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Convert mode string to apex_mode_t enum
|
|
22
|
+
*/
|
|
23
|
+
+ (apex_mode_t)apexModeFromString:(NSString *)modeString {
|
|
24
|
+
NSString *mode = [modeString lowercaseString];
|
|
25
|
+
|
|
26
|
+
if ([mode isEqualToString:@"commonmark"]) {
|
|
27
|
+
return APEX_MODE_COMMONMARK;
|
|
28
|
+
} else if ([mode isEqualToString:@"gfm"]) {
|
|
29
|
+
return APEX_MODE_GFM;
|
|
30
|
+
} else if ([mode isEqualToString:@"multimarkdown"] ||
|
|
31
|
+
[mode isEqualToString:@"mmd"]) {
|
|
32
|
+
return APEX_MODE_MULTIMARKDOWN;
|
|
33
|
+
} else if ([mode isEqualToString:@"kramdown"]) {
|
|
34
|
+
return APEX_MODE_KRAMDOWN;
|
|
35
|
+
} else {
|
|
36
|
+
return APEX_MODE_UNIFIED; /* Default to unified */
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Convert Markdown to HTML using Apex (unified mode)
|
|
42
|
+
*/
|
|
43
|
+
+ (NSString *)convertWithApex:(NSString *)inputString {
|
|
44
|
+
return [self convertWithApex:inputString mode:ApexModeUnified];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Convert Markdown to HTML using Apex with specific mode
|
|
49
|
+
*/
|
|
50
|
+
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
51
|
+
mode:(NSString *)modeString {
|
|
52
|
+
if (!inputString || [inputString length] == 0) {
|
|
53
|
+
return @"";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Convert to C string */
|
|
57
|
+
const char *markdown = [inputString UTF8String];
|
|
58
|
+
if (!markdown) {
|
|
59
|
+
return @"";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Get options for the specified mode */
|
|
63
|
+
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
64
|
+
apex_options options = apex_options_for_mode(mode);
|
|
65
|
+
|
|
66
|
+
/* Convert to HTML */
|
|
67
|
+
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
68
|
+
|
|
69
|
+
if (!html_c) {
|
|
70
|
+
return @"";
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Convert back to NSString */
|
|
74
|
+
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
75
|
+
apex_free_string(html_c);
|
|
76
|
+
|
|
77
|
+
return html ? html : @"";
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Convert Markdown to HTML using Apex with standalone document options
|
|
82
|
+
*/
|
|
83
|
+
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
84
|
+
mode:(NSString *)modeString
|
|
85
|
+
standalone:(BOOL)standalone
|
|
86
|
+
stylesheet:(NSString *_Nullable)stylesheetPath
|
|
87
|
+
title:(NSString *_Nullable)title {
|
|
88
|
+
if (!inputString || [inputString length] == 0) {
|
|
89
|
+
return @"";
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Convert to C string */
|
|
93
|
+
const char *markdown = [inputString UTF8String];
|
|
94
|
+
if (!markdown) {
|
|
95
|
+
return @"";
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Get options for the specified mode */
|
|
99
|
+
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
100
|
+
apex_options options = apex_options_for_mode(mode);
|
|
101
|
+
|
|
102
|
+
/* Set standalone document options */
|
|
103
|
+
options.standalone = standalone;
|
|
104
|
+
if (stylesheetPath && [stylesheetPath length] > 0) {
|
|
105
|
+
const char *paths[2];
|
|
106
|
+
paths[0] = [stylesheetPath UTF8String];
|
|
107
|
+
paths[1] = NULL;
|
|
108
|
+
options.stylesheet_paths = paths;
|
|
109
|
+
options.stylesheet_count = 1;
|
|
110
|
+
}
|
|
111
|
+
if (title && [title length] > 0) {
|
|
112
|
+
options.document_title = [title UTF8String];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Convert to HTML */
|
|
116
|
+
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
117
|
+
|
|
118
|
+
if (!html_c) {
|
|
119
|
+
return @"";
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Convert back to NSString */
|
|
123
|
+
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
124
|
+
apex_free_string(html_c);
|
|
125
|
+
|
|
126
|
+
return html ? html : @"";
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Convert Markdown to HTML using Apex with pretty printing option
|
|
131
|
+
*/
|
|
132
|
+
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
133
|
+
mode:(NSString *)modeString
|
|
134
|
+
pretty:(BOOL)pretty {
|
|
135
|
+
if (!inputString || [inputString length] == 0) {
|
|
136
|
+
return @"";
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Convert to C string */
|
|
140
|
+
const char *markdown = [inputString UTF8String];
|
|
141
|
+
if (!markdown) {
|
|
142
|
+
return @"";
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Get options for the specified mode */
|
|
146
|
+
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
147
|
+
apex_options options = apex_options_for_mode(mode);
|
|
148
|
+
|
|
149
|
+
/* Set pretty printing option */
|
|
150
|
+
options.pretty = pretty;
|
|
151
|
+
|
|
152
|
+
/* Convert to HTML */
|
|
153
|
+
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
154
|
+
|
|
155
|
+
if (!html_c) {
|
|
156
|
+
return @"";
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Convert back to NSString */
|
|
160
|
+
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
161
|
+
apex_free_string(html_c);
|
|
162
|
+
|
|
163
|
+
return html ? html : @"";
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Convert Markdown to HTML using Apex with dictionary-based options
|
|
168
|
+
*/
|
|
169
|
+
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
170
|
+
mode:(NSString *)modeString
|
|
171
|
+
options:
|
|
172
|
+
(NSDictionary<NSString *, id> *_Nullable)optionsDict {
|
|
173
|
+
if (!inputString || [inputString length] == 0) {
|
|
174
|
+
return @"";
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* Convert to C string */
|
|
178
|
+
const char *markdown = [inputString UTF8String];
|
|
179
|
+
if (!markdown) {
|
|
180
|
+
return @"";
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Get options for the specified mode */
|
|
184
|
+
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
185
|
+
apex_options options = apex_options_for_mode(mode);
|
|
186
|
+
|
|
187
|
+
/* Apply dictionary options if provided */
|
|
188
|
+
if (optionsDict) {
|
|
189
|
+
/* Pretty printing */
|
|
190
|
+
id prettyValue = optionsDict[@"pretty"];
|
|
191
|
+
if (prettyValue && [prettyValue isKindOfClass:[NSNumber class]]) {
|
|
192
|
+
options.pretty = [prettyValue boolValue];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Standalone document */
|
|
196
|
+
id standaloneValue = optionsDict[@"standalone"];
|
|
197
|
+
if (standaloneValue && [standaloneValue isKindOfClass:[NSNumber class]]) {
|
|
198
|
+
options.standalone = [standaloneValue boolValue];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Stylesheet path */
|
|
202
|
+
id stylesheetValue = optionsDict[@"stylesheet"];
|
|
203
|
+
if (stylesheetValue && [stylesheetValue isKindOfClass:[NSString class]]) {
|
|
204
|
+
NSString *stylesheet = (NSString *)stylesheetValue;
|
|
205
|
+
if ([stylesheet length] > 0) {
|
|
206
|
+
const char *paths[2];
|
|
207
|
+
paths[0] = [stylesheet UTF8String];
|
|
208
|
+
paths[1] = NULL;
|
|
209
|
+
options.stylesheet_paths = paths;
|
|
210
|
+
options.stylesheet_count = 1;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* Document title */
|
|
215
|
+
id titleValue = optionsDict[@"title"];
|
|
216
|
+
if (titleValue && [titleValue isKindOfClass:[NSString class]]) {
|
|
217
|
+
NSString *title = (NSString *)titleValue;
|
|
218
|
+
if ([title length] > 0) {
|
|
219
|
+
options.document_title = [title UTF8String];
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Hard breaks */
|
|
224
|
+
id hardBreaksValue = optionsDict[@"hardBreaks"];
|
|
225
|
+
if (hardBreaksValue && [hardBreaksValue isKindOfClass:[NSNumber class]]) {
|
|
226
|
+
options.hardbreaks = [hardBreaksValue boolValue];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Generate header IDs */
|
|
230
|
+
id generateHeaderIDsValue = optionsDict[@"generateHeaderIDs"];
|
|
231
|
+
if (generateHeaderIDsValue &&
|
|
232
|
+
[generateHeaderIDsValue isKindOfClass:[NSNumber class]]) {
|
|
233
|
+
options.generate_header_ids = [generateHeaderIDsValue boolValue];
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Unsafe HTML */
|
|
237
|
+
id unsafeValue = optionsDict[@"unsafe"];
|
|
238
|
+
if (unsafeValue && [unsafeValue isKindOfClass:[NSNumber class]]) {
|
|
239
|
+
options.unsafe = [unsafeValue boolValue];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* Header anchors */
|
|
243
|
+
id headerAnchorsValue = optionsDict[@"headerAnchors"];
|
|
244
|
+
if (headerAnchorsValue &&
|
|
245
|
+
[headerAnchorsValue isKindOfClass:[NSNumber class]]) {
|
|
246
|
+
options.header_anchors = [headerAnchorsValue boolValue];
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* Obfuscate emails */
|
|
250
|
+
id obfuscateEmailsValue = optionsDict[@"obfuscateEmails"];
|
|
251
|
+
if (obfuscateEmailsValue &&
|
|
252
|
+
[obfuscateEmailsValue isKindOfClass:[NSNumber class]]) {
|
|
253
|
+
options.obfuscate_emails = [obfuscateEmailsValue boolValue];
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* Embed images */
|
|
257
|
+
id embedImagesValue = optionsDict[@"embedImages"];
|
|
258
|
+
if (embedImagesValue && [embedImagesValue isKindOfClass:[NSNumber class]]) {
|
|
259
|
+
options.embed_images = [embedImagesValue boolValue];
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* Convert to HTML */
|
|
264
|
+
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
265
|
+
|
|
266
|
+
if (!html_c) {
|
|
267
|
+
return @"";
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* Convert back to NSString */
|
|
271
|
+
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
272
|
+
apex_free_string(html_c);
|
|
273
|
+
|
|
274
|
+
return html ? html : @"";
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Convert Markdown to HTML using Apex with common options combined
|
|
279
|
+
*/
|
|
280
|
+
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
281
|
+
mode:(NSString *)modeString
|
|
282
|
+
generateHeaderIDs:(BOOL)generateHeaderIDs
|
|
283
|
+
hardBreaks:(BOOL)hardBreaks
|
|
284
|
+
pretty:(BOOL)pretty {
|
|
285
|
+
if (!inputString || [inputString length] == 0) {
|
|
286
|
+
return @"";
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* Convert to C string */
|
|
290
|
+
const char *markdown = [inputString UTF8String];
|
|
291
|
+
if (!markdown) {
|
|
292
|
+
return @"";
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/* Get options for the specified mode */
|
|
296
|
+
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
297
|
+
apex_options options = apex_options_for_mode(mode);
|
|
298
|
+
|
|
299
|
+
/* Set common options */
|
|
300
|
+
options.generate_header_ids = generateHeaderIDs;
|
|
301
|
+
options.hardbreaks = hardBreaks;
|
|
302
|
+
options.pretty = pretty;
|
|
303
|
+
|
|
304
|
+
/* Convert to HTML */
|
|
305
|
+
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
306
|
+
|
|
307
|
+
if (!html_c) {
|
|
308
|
+
return @"";
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/* Convert back to NSString */
|
|
312
|
+
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
313
|
+
apex_free_string(html_c);
|
|
314
|
+
|
|
315
|
+
return html ? html : @"";
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Convert this string (as Markdown) to HTML using Apex in unified mode
|
|
320
|
+
*/
|
|
321
|
+
- (NSString *)apexHTML {
|
|
322
|
+
return [NSString convertWithApex:self];
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Convert this string (as Markdown) to HTML using Apex with specific mode
|
|
327
|
+
*/
|
|
328
|
+
- (NSString *)apexHTMLWithMode:(NSString *)mode {
|
|
329
|
+
return [NSString convertWithApex:self mode:mode];
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
@end
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
<!--README-->
|
|
2
|
+
[](https://github.com/ApexMarkdown/apex/releases/latest)  [](https://opensource.org/licenses/MIT) <!--TESTS_BADGE--><!--END TESTS_BADGE-->
|
|
3
|
+
|
|
4
|
+
<!--GITHUB-->
|
|
5
|
+
# Apex
|
|
6
|
+
<!--END GITHUB-->
|
|
7
|
+
|
|
8
|
+
Apex is a unified Markdown processor that combines the best
|
|
9
|
+
features from CommonMark, GitHub Flavored Markdown (GFM),
|
|
10
|
+
MultiMarkdown, Kramdown, and Marked. One processor to rule
|
|
11
|
+
them all.
|
|
12
|
+
|
|
13
|
+
<!--GITHUB-->
|
|
14
|
+

|
|
15
|
+
<!--END GITHUB-->
|
|
16
|
+
|
|
17
|
+
<!--JEKYLL {% img alignright /uploads/2025/12/apexicon.png 300 300 "Apex Icon" %}-->There are so many variations of
|
|
18
|
+
Markdown, extending its features in all kinds of ways. But
|
|
19
|
+
picking one flavor means giving up the features of another
|
|
20
|
+
flavor. So I'm building Apex with the goal of making all of
|
|
21
|
+
the most popular features of various processors available in
|
|
22
|
+
one tool.
|
|
23
|
+
|
|
24
|
+
## Features
|
|
25
|
+
|
|
26
|
+
### Compatibility Modes
|
|
27
|
+
|
|
28
|
+
- **Multiple compatibility modes**: CommonMark, GFM, MultiMarkdown, Kramdown, and Unified (all features)
|
|
29
|
+
- **Mode-specific features**: Each mode enables appropriate extensions for maximum compatibility
|
|
30
|
+
|
|
31
|
+
### Markdown Extensions
|
|
32
|
+
|
|
33
|
+
- **Tables**: GitHub Flavored Markdown tables with advanced features (rowspan via `^^`, colspan via empty cells/`<<`, captions before/after tables including Pandoc-style `Table: Caption` and `: Caption` syntax, and individual cell alignment using colons `:Left`, `Right:`, `:Center:`)
|
|
34
|
+
- **Table caption positioning**: Control caption placement with `--captions above` or `--captions below` (default: below)
|
|
35
|
+
- **Table caption IAL**: IAL attributes in table captions (e.g., `: Caption {#id .class}`) are extracted and applied to the table element
|
|
36
|
+
- **Relaxed tables**: Support for tables without separator rows (Kramdown-style)
|
|
37
|
+
- **Headerless tables**: Support for tables that start with alignment rows (separator rows) without header rows; column alignment is automatically applied
|
|
38
|
+
- **Footnotes**: Three syntaxes supported (reference-style, Kramdown inline, MultiMarkdown inline)
|
|
39
|
+
- **Definition lists**: Kramdown-style definition lists with Markdown content support
|
|
40
|
+
- **Task lists**: GitHub-style checkboxes (`- [ ]` and `- [x]`)
|
|
41
|
+
- **Strikethrough**: `~~text~~` syntax from GFM
|
|
42
|
+
- **Smart typography**: Automatic conversion of quotes, dashes, ellipses, and more
|
|
43
|
+
- **Math support**: LaTeX math expressions with `$...$` (inline) and `$$...$$` (display)
|
|
44
|
+
|
|
45
|
+
- **Syntax highlighting**: External syntax highlighting for fenced code blocks via Pygments or Skylighting with `--code-highlight` flag.
|
|
46
|
+
|
|
47
|
+
Supports language-aware highlighting, auto-detection, and line numbers with `--code-line-numbers`
|
|
48
|
+
|
|
49
|
+
- **Wiki links**: `[[Page Name]]`, `[[Page Name|Display Text]]`, and `[[Page Name#Section]]` syntax with configurable link targets via `--wikilink-space` and `--wikilink-extension`
|
|
50
|
+
- **Abbreviations**: Three syntaxes (classic MMD, MMD 6 reference, MMD 6 inline)
|
|
51
|
+
- **Callouts**: Bear/Obsidian-style callouts with collapsible support (`> [!NOTE]`, `> [!WARNING]`, etc.)
|
|
52
|
+
- **GitHub emoji**: 350+ emoji support (`:rocket:`, `:heart:`, etc.)
|
|
53
|
+
|
|
54
|
+
### Document Features
|
|
55
|
+
|
|
56
|
+
<!--JEKYLL {% raw %}-->
|
|
57
|
+
|
|
58
|
+
- **Metadata blocks**: YAML front matter, MultiMarkdown metadata, and Pandoc title blocks
|
|
59
|
+
- **Metadata variables**: Insert metadata values with `[%key]` syntax
|
|
60
|
+
- **Metadata transforms**: Transform metadata values with `[%key:transform]` syntax
|
|
61
|
+
|
|
62
|
+
Supports case conversion, string manipulation, regex replacement, date formatting, and more.
|
|
63
|
+
|
|
64
|
+
See [Metadata Transforms](https://github.com/ApexMarkdown/apex/wiki/Metadata-Transforms) for complete documentation
|
|
65
|
+
- **Metadata control of options**: Control command-line options via metadata
|
|
66
|
+
- set boolean flags (`indices: false`, `wikilinks: true`) and string options (`bibliography: refs.bib`, `title: My Document`, `wikilink-space: dash`, `wikilink-extension: html`) directly in document metadata for per-document configuration
|
|
67
|
+
- **Table of Contents**: Automatic TOC generation with depth control using HTML (`<!--TOC-->`), MMD (`{{TOC}}` / `{{TOC:2-4}}`), and Kramdown `{:toc}` markers. Headings marked with `{:.no_toc}` are excluded from the generated TOC.
|
|
68
|
+
- **File includes**: Three syntaxes (Marked `<<[file]`, MultiMarkdown `{{file}}`, iA Writer `/file`), with support for address ranges and wildcard/glob patterns such as `{{file.*}}`, `{{*.md}}`, and `{{c?de.py}}`.
|
|
69
|
+
- **Markdown combiner (`--combine`)**: Concatenate one or more Markdown files into a single Markdown stream, expanding all include syntaxes.
|
|
70
|
+
|
|
71
|
+
When a `SUMMARY.md` file is provided, Apex treats it as a GitBook-style index and combines the linked files in order, perfect for building books, multi-file indices, and shared tables of contents that can then be piped back into Apex for final rendering.
|
|
72
|
+
- **MultiMarkdown merge (`--mmd-merge`)**: Read one or more mmd_merge-style index files and stitch their referenced documents into a single Markdown stream.
|
|
73
|
+
|
|
74
|
+
Each non-empty, non-comment line specifies a file to include; indentation with tabs or four-space groups shifts all headings in that file down by one level per indent, mirroring the original `mmd_merge.pl` behavior.
|
|
75
|
+
|
|
76
|
+
Output is raw Markdown that can be piped into Apex (e.g., `apex --mmd-merge index.txt | apex --mode mmd`).
|
|
77
|
+
|
|
78
|
+
- **CSV/TSV support**: Automatic table conversion from CSV and TSV files
|
|
79
|
+
- **Inline Attribute Lists (IAL)**: Kramdown-style attributes `{: #id .class}` and Pandoc-style attributes `{#id .class}`
|
|
80
|
+
|
|
81
|
+
Both formats work in all contexts (block-level, inline, paragraphs, headings, table captions)
|
|
82
|
+
- **Bracketed spans**: Convert `[text]{IAL}` syntax to HTML span elements with attributes, enabled by default in unified mode
|
|
83
|
+
- **Fenced divs**: Pandoc-style fenced divs `::::: {#id .class} ... :::::` for creating custom block containers, enabled by default in unified mode.
|
|
84
|
+
|
|
85
|
+
Supports block type syntax `>blocktype` to create different HTML elements (e.g., `::: >aside {.sidebar}` creates `<aside>` instead of `<div>`). Common block types include `aside`, `article`, `section`, `details`, `summary`, `header`, `footer`, `nav`, and custom elements
|
|
86
|
+
- **Image IAL support**: Inline and reference-style images support IAL syntax with automatic width/height conversion (percentages and non-integer/non-px values convert to style attributes, Xpx values convert to integer width/height attributes, bare integers remain as width/height attributes)
|
|
87
|
+
- **Special markers**: Page breaks (`<!--BREAK-->`), autoscroll pauses (`<!--PAUSE:N-->`), end-of-block markers
|
|
88
|
+
<!--JEKYLL {% endraw %}-->
|
|
89
|
+
|
|
90
|
+
### Citations and Bibliography
|
|
91
|
+
|
|
92
|
+
- **Multiple citation syntaxes**: Pandoc (`[@key]`), MultiMarkdown (`[#key]`), and mmark (`[@RFC1234]`) styles
|
|
93
|
+
- **Bibliography formats**: Support for BibTeX (`.bib`), CSL JSON (`.json`), and CSL YAML (`.yml`, `.yaml`) formats
|
|
94
|
+
- **Automatic bibliography generation**: Bibliography automatically generated from cited entries
|
|
95
|
+
- **Citation linking**: Option to link citations to bibliography entries
|
|
96
|
+
- **Metadata support**: Bibliography can be specified in document metadata or via command-line flags
|
|
97
|
+
- **Multiple bibliography files**: Support for loading and merging multiple bibliography files
|
|
98
|
+
- **CSL style support**: Citation Style Language (CSL) files for custom citation formatting
|
|
99
|
+
- **Mode support**: Citations enabled in MultiMarkdown and unified modes
|
|
100
|
+
|
|
101
|
+
### Indices
|
|
102
|
+
|
|
103
|
+
- **mmark syntax**: `(!item)`, `(!item, subitem)`, `(!!item, subitem)` for primary entries
|
|
104
|
+
- **TextIndex syntax**: `{^}`, `[term]{^}`, `{^params}` for flexible indexing
|
|
105
|
+
- **Automatic index generation**: Index automatically generated at end of document or at `<!--INDEX-->` marker
|
|
106
|
+
- **Alphabetical sorting**: Entries sorted alphabetically with optional grouping by first letter
|
|
107
|
+
- **Hierarchical sub-items**: Support for nested index entries
|
|
108
|
+
- **Mode support**: Indices enabled by default in MultiMarkdown and unified modes
|
|
109
|
+
|
|
110
|
+
### Critic Markup
|
|
111
|
+
|
|
112
|
+
- **Change tracking**: Additions (`{++text++}`), deletions (`{--text--}`), substitutions (`{~~old~>new~~}`)
|
|
113
|
+
- **Annotations**: Highlights (`{==text==}`) and comments (`{>>text<<}`)
|
|
114
|
+
- **Accept mode**: `--accept` flag to apply all changes for final output
|
|
115
|
+
- **Reject mode**: `--reject` flag to revert all changes to original
|
|
116
|
+
|
|
117
|
+
### Output Options
|
|
118
|
+
|
|
119
|
+
- **Flexible output**: Compact HTML fragments, pretty-printed HTML, or complete standalone documents
|
|
120
|
+
- **Standalone documents**: Generate complete HTML5 documents with `<html>`, `<head>`, `<body>` tags
|
|
121
|
+
- **Custom styling**: Link multiple external CSS files in standalone mode (use `--css` multiple times or comma-separated list)
|
|
122
|
+
- **Syntax highlighting**: External syntax highlighting via Pygments or Skylighting with `--code-highlight` flag, includes automatic GitHub-style CSS in standalone mode
|
|
123
|
+
- **Pretty-print**: Formatted HTML with proper indentation for readability
|
|
124
|
+
- **Header ID generation**: Automatic or manual header IDs with multiple format options (GFM, MMD, Kramdown)
|
|
125
|
+
- **Emoji-to-name conversion**: In GFM mode, emojis in headers are converted to their textual names in IDs (e.g., `# 😄 Support` → `id="smile-support"`), matching Pandoc's GFM behavior
|
|
126
|
+
- **Header anchors**: Option to generate `<a>` anchor tags instead of header IDs
|
|
127
|
+
- **ARIA accessibility**: Add ARIA labels and accessibility attributes (`--aria`) for better screen reader support, including aria-label on TOC navigation, role attributes on figures and tables, and aria-describedby linking tables to their captions
|
|
128
|
+
|
|
129
|
+
### Advanced Features
|
|
130
|
+
|
|
131
|
+
- **Hard breaks**: Option to treat newlines as hard line breaks
|
|
132
|
+
- **Feature toggles**: Granular control to enable/disable specific features (tables, footnotes, math, smart typography, etc.)
|
|
133
|
+
- **Unsafe HTML**: Option to allow or block raw HTML in documents
|
|
134
|
+
- **Autolinks**: Automatic URL detection and linking
|
|
135
|
+
- **Superscript/Subscript**: Support for `^superscript^` and `~subscript~` syntax
|
|
136
|
+
|
|
137
|
+
### Extensibility and Plugins
|
|
138
|
+
|
|
139
|
+
Apex supports a flexible plugin system that lets you add new syntax and post-processing features in any language while keeping the core parser stable and fast. Plugins are disabled by default so there is no performance impact unless you opt in. Enable them per run with `--plugins`, or per document with a `plugins: true` (or `enable-plugins: true`) key in your metadata.
|
|
140
|
+
|
|
141
|
+
You can manage plugins from the CLI:
|
|
142
|
+
|
|
143
|
+
- Install plugins with `--install-plugin`:
|
|
144
|
+
|
|
145
|
+
From the central directory using an ID: `--install-plugin kbd`
|
|
146
|
+
|
|
147
|
+
Directly from a Git URL or GitHub shorthand: `--install-plugin https://github.com/user/repo.git` or `--install-plugin user/repo`
|
|
148
|
+
|
|
149
|
+
- Uninstall a local plugin with `--uninstall-plugin ID`.
|
|
150
|
+
- See installed and available plugins with `--list-plugins`.
|
|
151
|
+
|
|
152
|
+
When installing from a direct Git URL or GitHub repo name,
|
|
153
|
+
Apex will prompt with a security warning before cloning,
|
|
154
|
+
since plugins execute unverified code.
|
|
155
|
+
|
|
156
|
+
For a complete guide to writing, installing, and publishing plugins, see the [Plugins](https://github.com/ApexMarkdown/apex/wiki/Plugins) page in the Apex Wiki.
|
|
157
|
+
|
|
158
|
+
## Installation
|
|
159
|
+
|
|
160
|
+
### Homebrew (macOS/Linux)
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
brew tap ttscoff/thelab
|
|
164
|
+
brew install ttscoff/thelab/apex
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Building from Source
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
git clone https://github.com/ApexMarkdown/apex.git
|
|
172
|
+
cd apex
|
|
173
|
+
git submodule update --init --recursive
|
|
174
|
+
make
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The `apex` binary will be in the `build/` directory.
|
|
179
|
+
|
|
180
|
+
To install the built binary and libraries system-wide:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
make install
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Note:** The default `make` command runs both `cmake -S . -B build` (to configure the project) and `cmake --build build` (to compile). If you prefer to run cmake commands directly, you can use those instead.
|
|
188
|
+
|
|
189
|
+
### Pre-built Binaries
|
|
190
|
+
|
|
191
|
+
Download pre-built binaries from the [latest release](https://github.com/ApexMarkdown/apex/releases/latest). Binaries are available for:
|
|
192
|
+
|
|
193
|
+
- macOS (Universal binary for arm64 and x86_64)
|
|
194
|
+
- Linux (x86_64 and arm64)
|
|
195
|
+
|
|
196
|
+
## Basic Usage
|
|
197
|
+
|
|
198
|
+
### Command Line
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Process a markdown file
|
|
202
|
+
apex input.md
|
|
203
|
+
|
|
204
|
+
# Output to a file
|
|
205
|
+
apex input.md -o output.html
|
|
206
|
+
|
|
207
|
+
# Generate standalone HTML document
|
|
208
|
+
apex input.md --standalone --title "My Document"
|
|
209
|
+
|
|
210
|
+
# Pretty-print HTML output
|
|
211
|
+
apex input.md --pretty
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Processing Modes
|
|
216
|
+
|
|
217
|
+
Apex supports multiple compatibility modes:
|
|
218
|
+
|
|
219
|
+
- `--mode commonmark` - Pure CommonMark specification
|
|
220
|
+
- `--mode gfm` - GitHub Flavored Markdown
|
|
221
|
+
|
|
222
|
+
`--mode mmd` or `--mode multimarkdown` - MultiMarkdown compatibility
|
|
223
|
+
|
|
224
|
+
- `--mode kramdown` - Kramdown compatibility
|
|
225
|
+
- `--mode unified` - All features enabled (default)
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
# Use GFM mode
|
|
229
|
+
apex input.md --mode gfm
|
|
230
|
+
|
|
231
|
+
# Use Kramdown mode with relaxed tables
|
|
232
|
+
apex input.md --mode kramdown
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Common Options
|
|
237
|
+
|
|
238
|
+
- `--pretty` - Pretty-print HTML with indentation
|
|
239
|
+
|
|
240
|
+
`--standalone` - Generate complete HTML document with `<html>`, `<head>`, `<body>`
|
|
241
|
+
|
|
242
|
+
`--style FILE` / `--css FILE` - Link to CSS file(s) in document head (requires `--standalone`). Can be used multiple times or with comma-separated list (e.g., `--css style.css --css syntax.css` or `--css style.css,syntax.css`)
|
|
243
|
+
|
|
244
|
+
`--embed-css` - Embed CSS file contents as inline `<style>` tags instead of `<link>` tags (works with multiple stylesheets)
|
|
245
|
+
|
|
246
|
+
- `--title TITLE` - Document title (requires `--standalone`)
|
|
247
|
+
- `--relaxed-tables` - Enable relaxed table parsing (default
|
|
248
|
+
|
|
249
|
+
in unified/kramdown modes)
|
|
250
|
+
|
|
251
|
+
- `--no-relaxed-tables` - Disable relaxed table parsing
|
|
252
|
+
|
|
253
|
+
`--captions POSITION` - Table caption position: `above` or `below` (default: `below`)
|
|
254
|
+
|
|
255
|
+
`--id-format FORMAT` - Header ID format: `gfm`, `mmd`, or `kramdown`
|
|
256
|
+
|
|
257
|
+
- `--no-ids` - Disable automatic header ID generation
|
|
258
|
+
- `--header-anchors` - Generate `<a>` anchor tags instead of
|
|
259
|
+
|
|
260
|
+
header IDs
|
|
261
|
+
|
|
262
|
+
- `--aria` - Add ARIA labels and accessibility attributes to
|
|
263
|
+
|
|
264
|
+
HTML output
|
|
265
|
+
|
|
266
|
+
- `--bibliography FILE` - Bibliography file (BibTeX, CSL
|
|
267
|
+
|
|
268
|
+
JSON, or CSL YAML) - can be used multiple times
|
|
269
|
+
|
|
270
|
+
- `--csl FILE` - Citation style file (CSL format)
|
|
271
|
+
|
|
272
|
+
`--link-citations` - Link citations to bibliography entries
|
|
273
|
+
|
|
274
|
+
- `--indices` - Enable index processing (mmark and TextIndex
|
|
275
|
+
|
|
276
|
+
syntax)
|
|
277
|
+
|
|
278
|
+
- `--no-indices` - Disable index processing
|
|
279
|
+
- `--no-index` - Suppress index generation (markers still
|
|
280
|
+
|
|
281
|
+
created)
|
|
282
|
+
|
|
283
|
+
`--wikilinks` - Enable wiki link syntax `[[Page]]`, `[[Page|Display]]`, and `[[Page#Section]]`
|
|
284
|
+
|
|
285
|
+
`--wikilink-space MODE` - Control how spaces in wiki link page names are converted (`dash`, `none`, `underscore`, `space`; default: `dash`)
|
|
286
|
+
|
|
287
|
+
`--wikilink-extension EXT` - File extension to append to wiki link URLs (e.g. `html`, `md`)
|
|
288
|
+
|
|
289
|
+
- `--divs` / `--no-divs` - Enable/disable Pandoc fenced divs
|
|
290
|
+
|
|
291
|
+
syntax (enabled by default in unified mode)
|
|
292
|
+
|
|
293
|
+
`--spans` / `--no-spans` - Enable/disable bracketed spans `[text]{IAL}` syntax (enabled by default in unified mode)
|
|
294
|
+
|
|
295
|
+
`--code-highlight TOOL` - Use external tool for syntax highlighting (supports `pygments`/`p`/`pyg` or `skylighting`/`s`/`sky`). Automatically includes GitHub-style CSS in standalone mode
|
|
296
|
+
|
|
297
|
+
`--code-line-numbers` - Include line numbers in syntax-highlighted code blocks (requires `--code-highlight`)
|
|
298
|
+
|
|
299
|
+
### All Options
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
@cli(build/apex -h 2>&1)
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Per-Document Configuration via Metadata
|
|
307
|
+
|
|
308
|
+
Most command-line options can be controlled via document
|
|
309
|
+
metadata, allowing different files to be processed with
|
|
310
|
+
different settings when processing batches. Boolean options
|
|
311
|
+
accept `true`/`false`, `yes`/`no`, or `1`/`0`
|
|
312
|
+
(case-insensitive). String options use the value directly.
|
|
313
|
+
|
|
314
|
+
**Example:**
|
|
315
|
+
|
|
316
|
+
```yaml
|
|
317
|
+
---
|
|
318
|
+
indices: false
|
|
319
|
+
wikilinks: true
|
|
320
|
+
bibliography: references.bib
|
|
321
|
+
title: My Research Paper
|
|
322
|
+
pretty: true
|
|
323
|
+
standalone: true
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
This allows you to process multiple files with `apex *.md` and have each file use its own configuration. You can also use `--meta-file` to specify a shared configuration file that applies to all processed files.
|
|
329
|
+
|
|
330
|
+
## Documentation
|
|
331
|
+
|
|
332
|
+
For complete documentation, see the [Apex Wiki](https://github.com/ApexMarkdown/apex/wiki).
|
|
333
|
+
|
|
334
|
+
Key documentation pages:
|
|
335
|
+
|
|
336
|
+
[Citations and Bibliography](https://github.com/ApexMarkdown/apex/wiki/Citations) - Complete guide to citations and bibliographies
|
|
337
|
+
|
|
338
|
+
[Command Line Options](https://github.com/ApexMarkdown/apex/wiki/Command-Line-Options) - All CLI flags explained
|
|
339
|
+
|
|
340
|
+
[Syntax Reference](https://github.com/ApexMarkdown/apex/wiki/Syntax) - Complete syntax reference
|
|
341
|
+
|
|
342
|
+
## Contributing
|
|
343
|
+
|
|
344
|
+
Contributions are welcome! Please feel free to submit a Pull
|
|
345
|
+
Request.
|
|
346
|
+
|
|
347
|
+
Please note the [tests requirement for new features](https://github.com/ApexMarkdown/apex/wiki/Writing-Tests).
|
|
348
|
+
|
|
349
|
+
1. Fork the [repository](https://github.com/ApexMarkdown/apex)
|
|
350
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
351
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
352
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
353
|
+
5. Open a Pull Request
|
|
354
|
+
|
|
355
|
+
## License
|
|
356
|
+
|
|
357
|
+
This project is licensed under the MIT License - see the [LICENSE]([LICENSE](https://github.com/ApexMarkdown/apex/blob/main/LICENSE)) file for details.
|
|
358
|
+
<!--END README-->
|