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,338 @@
|
|
|
1
|
+
.\" Automatically generated by Pandoc 3.6.3
|
|
2
|
+
.\"
|
|
3
|
+
.TH "APEX" "1" "December 2025" ""
|
|
4
|
+
.SH NAME
|
|
5
|
+
apex \- Unified Markdown processor supporting CommonMark, GFM,
|
|
6
|
+
MultiMarkdown, and Kramdown
|
|
7
|
+
.SH SYNOPSIS
|
|
8
|
+
\f[B]apex\f[R] [\f[I]options\f[R]] [\f[I]file\f[R]]
|
|
9
|
+
.SH DESCRIPTION
|
|
10
|
+
Apex is a unified Markdown processor that combines the best features
|
|
11
|
+
from CommonMark, GitHub Flavored Markdown (GFM), MultiMarkdown,
|
|
12
|
+
Kramdown, and Marked.
|
|
13
|
+
One processor to rule them all.
|
|
14
|
+
.PP
|
|
15
|
+
If no file is specified, \f[B]apex\f[R] reads from stdin.
|
|
16
|
+
.SH OPTIONS
|
|
17
|
+
.SS Processing Modes
|
|
18
|
+
.TP
|
|
19
|
+
\f[B]\-m\f[R] \f[I]MODE\f[R], \f[B]\[en]mode\f[R] \f[I]MODE\f[R]
|
|
20
|
+
Processor mode: \f[B]commonmark\f[R], \f[B]gfm\f[R], \f[B]mmd\f[R] (or
|
|
21
|
+
\f[B]multimarkdown\f[R]), \f[B]kramdown\f[R], or \f[B]unified\f[R]
|
|
22
|
+
(default).
|
|
23
|
+
Each mode enables different features and syntax compatibility.
|
|
24
|
+
.SS Input/Output
|
|
25
|
+
.TP
|
|
26
|
+
\f[B]\-o\f[R] \f[I]FILE\f[R], \f[B]\[en]output\f[R] \f[I]FILE\f[R]
|
|
27
|
+
Write output to \f[I]FILE\f[R] instead of stdout.
|
|
28
|
+
.TP
|
|
29
|
+
\f[B]\-s\f[R], \f[B]\[en]standalone\f[R]
|
|
30
|
+
Generate complete HTML document with \f[CR]<html>\f[R],
|
|
31
|
+
\f[CR]<head>\f[R], and \f[CR]<body>\f[R] tags.
|
|
32
|
+
.TP
|
|
33
|
+
\f[B]\[en]style\f[R] \f[I]FILE\f[R]
|
|
34
|
+
Link to CSS file in document head (requires \f[B]\[en]standalone\f[R]).
|
|
35
|
+
.TP
|
|
36
|
+
\f[B]\[en]title\f[R] \f[I]TITLE\f[R]
|
|
37
|
+
Document title (requires \f[B]\[en]standalone\f[R], default:
|
|
38
|
+
\[lq]Document\[rq]).
|
|
39
|
+
.TP
|
|
40
|
+
\f[B]\[en]pretty\f[R]
|
|
41
|
+
Pretty\-print HTML with indentation and whitespace.
|
|
42
|
+
.SS Feature Flags
|
|
43
|
+
.TP
|
|
44
|
+
\f[B]\[en]accept\f[R]
|
|
45
|
+
Accept all Critic Markup changes (apply edits).
|
|
46
|
+
.TP
|
|
47
|
+
\f[B]\[en]reject\f[R]
|
|
48
|
+
Reject all Critic Markup changes (revert edits).
|
|
49
|
+
.TP
|
|
50
|
+
\f[B]\[en]enable\-includes\f[R]
|
|
51
|
+
Enable file inclusion.
|
|
52
|
+
.TP
|
|
53
|
+
\f[B]\[en]meta\-file\f[R] \f[I]FILE\f[R]
|
|
54
|
+
Load metadata from an external file.
|
|
55
|
+
Auto\-detects format: YAML (starts with \f[CR]\-\-\-\f[R]),
|
|
56
|
+
MultiMarkdown (key: value pairs), or Pandoc (starts with \f[CR]%\f[R]).
|
|
57
|
+
Metadata from the file is merged with document metadata, with document
|
|
58
|
+
metadata taking precedence.
|
|
59
|
+
.TP
|
|
60
|
+
\f[B]\[en]meta\f[R] \f[I]KEY=VALUE\f[R]
|
|
61
|
+
Set a metadata key\-value pair.
|
|
62
|
+
Can be used multiple times.
|
|
63
|
+
Supports comma\-separated pairs (e.g.,
|
|
64
|
+
\f[CR]\-\-meta KEY1=value1,KEY2=value2\f[R]).
|
|
65
|
+
Values can be quoted to include spaces and special characters.
|
|
66
|
+
Command\-line metadata takes precedence over both file and document
|
|
67
|
+
metadata.
|
|
68
|
+
.TP
|
|
69
|
+
\f[B]\[en]hardbreaks\f[R]
|
|
70
|
+
Treat newlines as hard breaks.
|
|
71
|
+
.TP
|
|
72
|
+
\f[B]\[en]no\-footnotes\f[R]
|
|
73
|
+
Disable footnote support.
|
|
74
|
+
.TP
|
|
75
|
+
\f[B]\[en]no\-math\f[R]
|
|
76
|
+
Disable math support.
|
|
77
|
+
.TP
|
|
78
|
+
\f[B]\[en]no\-smart\f[R]
|
|
79
|
+
Disable smart typography.
|
|
80
|
+
.TP
|
|
81
|
+
\f[B]\[en]no\-tables\f[R]
|
|
82
|
+
Disable table support.
|
|
83
|
+
.TP
|
|
84
|
+
\f[B]\[en]no\-ids\f[R]
|
|
85
|
+
Disable automatic header ID generation.
|
|
86
|
+
.TP
|
|
87
|
+
\f[B]\[en]header\-anchors\f[R]
|
|
88
|
+
Generate \f[CR]<a>\f[R] anchor tags instead of header IDs.
|
|
89
|
+
.TP
|
|
90
|
+
\f[B]\[en]wikilinks\f[R], \f[B]\[en]no\-wikilinks\f[R]
|
|
91
|
+
Enable wiki link syntax \f[CR][[PageName]]\f[R].
|
|
92
|
+
Default: disabled.
|
|
93
|
+
.SS Header ID Format
|
|
94
|
+
.TP
|
|
95
|
+
\f[B]\[en]id\-format\f[R] \f[I]FORMAT\f[R]
|
|
96
|
+
Header ID format: \f[B]gfm\f[R] (default), \f[B]mmd\f[R], or
|
|
97
|
+
\f[B]kramdown\f[R].
|
|
98
|
+
Modes auto\-set format; use this to override in unified mode.
|
|
99
|
+
.SS List Options
|
|
100
|
+
.TP
|
|
101
|
+
\f[B]\[en]alpha\-lists\f[R], \f[B]\[en]no\-alpha\-lists\f[R]
|
|
102
|
+
Support alpha list markers (a., b., c.\ and A., B., C.).
|
|
103
|
+
.TP
|
|
104
|
+
\f[B]\[en]mixed\-lists\f[R], \f[B]\[en]no\-mixed\-lists\f[R]
|
|
105
|
+
Allow mixed list markers at same level (inherit type from first item).
|
|
106
|
+
.SS Table Options
|
|
107
|
+
.TP
|
|
108
|
+
\f[B]\[en]relaxed\-tables\f[R], \f[B]\[en]no\-relaxed\-tables\f[R]
|
|
109
|
+
Enable relaxed table parsing (no separator rows required).
|
|
110
|
+
Default: enabled in unified/kramdown modes, disabled in
|
|
111
|
+
commonmark/gfm/multimarkdown modes.
|
|
112
|
+
.SS HTML and Links
|
|
113
|
+
.TP
|
|
114
|
+
\f[B]\[en]unsafe\f[R], \f[B]\[en]no\-unsafe\f[R]
|
|
115
|
+
Allow raw HTML in output.
|
|
116
|
+
Default: true for unified/mmd/kramdown modes, false for commonmark/gfm
|
|
117
|
+
modes.
|
|
118
|
+
.TP
|
|
119
|
+
\f[B]\[en]autolink\f[R], \f[B]\[en]no\-autolink\f[R]
|
|
120
|
+
Enable autolinking of URLs and email addresses.
|
|
121
|
+
Default: enabled in GFM, MultiMarkdown, Kramdown, and unified modes;
|
|
122
|
+
disabled in CommonMark mode.
|
|
123
|
+
.TP
|
|
124
|
+
\f[B]\[en]obfuscate\-emails\f[R]
|
|
125
|
+
Obfuscate email links and text using HTML entities (hex\-encoded).
|
|
126
|
+
.SS Image Embedding
|
|
127
|
+
.TP
|
|
128
|
+
\f[B]\[en]embed\-images\f[R]
|
|
129
|
+
Embed local images as base64 data URLs in HTML output.
|
|
130
|
+
Only local images (file paths) are embedded; remote images (http://,
|
|
131
|
+
https://) are not processed.
|
|
132
|
+
Images are read from the filesystem and encoded as base64 data URLs
|
|
133
|
+
(e.g., \f[CR]data:image/png;base64,...\f[R]).
|
|
134
|
+
Relative paths are resolved using the base directory (see
|
|
135
|
+
\f[B]\[en]base\-dir\f[R]).
|
|
136
|
+
.SS Path Resolution
|
|
137
|
+
.TP
|
|
138
|
+
\f[B]\[en]base\-dir\f[R] \f[I]DIR\f[R]
|
|
139
|
+
Base directory for resolving relative paths.
|
|
140
|
+
Used for: \- Image embedding (with \f[B]\[en]embed\-images\f[R]) \- File
|
|
141
|
+
includes/transclusions \- Relative path resolution when reading from
|
|
142
|
+
stdin or when the working directory differs from the document location
|
|
143
|
+
.RS
|
|
144
|
+
.PP
|
|
145
|
+
If not specified and reading from a file, the base directory is
|
|
146
|
+
automatically set to the input file\[cq]s directory.
|
|
147
|
+
When reading from stdin, this flag must be used to resolve relative
|
|
148
|
+
paths.
|
|
149
|
+
.RE
|
|
150
|
+
.SS Superscript/Subscript
|
|
151
|
+
.TP
|
|
152
|
+
\f[B]\[en]sup\-sub\f[R], \f[B]\[en]no\-sup\-sub\f[R]
|
|
153
|
+
Enable MultiMarkdown\-style superscript and subscript syntax.
|
|
154
|
+
The \f[CR]\[ha]\f[R] character creates superscript for the text
|
|
155
|
+
immediately following it (stops at space or punctuation).
|
|
156
|
+
The \f[CR]\[ti]\f[R] character creates subscript when used within a
|
|
157
|
+
word/identifier (e.g., \f[CR]H\[ti]2\[ti]O\f[R] creates H₂O).
|
|
158
|
+
When tildes are at word boundaries (e.g., \f[CR]\[ti]text\[ti]\f[R]),
|
|
159
|
+
they create underline instead.
|
|
160
|
+
Default: enabled in unified and MultiMarkdown modes.
|
|
161
|
+
.SS Citations and Bibliography
|
|
162
|
+
.TP
|
|
163
|
+
\f[B]\[en]bibliography\f[R] \f[I]FILE\f[R]
|
|
164
|
+
Bibliography file in BibTeX, CSL JSON, or CSL YAML format.
|
|
165
|
+
Can be specified multiple times to load multiple bibliography files.
|
|
166
|
+
Citations are automatically enabled when this option is used.
|
|
167
|
+
Bibliography can also be specified in document metadata.
|
|
168
|
+
.TP
|
|
169
|
+
\f[B]\[en]csl\f[R] \f[I]FILE\f[R]
|
|
170
|
+
Citation Style Language (CSL) file for formatting citations and
|
|
171
|
+
bibliography.
|
|
172
|
+
Citations are automatically enabled when this option is used.
|
|
173
|
+
CSL file can also be specified in document metadata.
|
|
174
|
+
.TP
|
|
175
|
+
\f[B]\[en]no\-bibliography\f[R]
|
|
176
|
+
Suppress bibliography output even when citations are present.
|
|
177
|
+
.TP
|
|
178
|
+
\f[B]\[en]link\-citations\f[R]
|
|
179
|
+
Link citations to their corresponding bibliography entries.
|
|
180
|
+
Citations will include \f[CR]href\f[R] attributes pointing to the
|
|
181
|
+
bibliography entry.
|
|
182
|
+
.TP
|
|
183
|
+
\f[B]\[en]show\-tooltips\f[R]
|
|
184
|
+
Show tooltips on citations when hovering (requires CSS support).
|
|
185
|
+
.PP
|
|
186
|
+
Citation syntax is supported in MultiMarkdown and unified modes: \-
|
|
187
|
+
Pandoc: \f[CR][\[at]key]\f[R], \f[CR][\[at]key1; \[at]key2]\f[R],
|
|
188
|
+
\f[CR]\[at]key\f[R] \- MultiMarkdown: \f[CR][#key]\f[R] \- mmark:
|
|
189
|
+
\f[CR][\[at]RFC1234]\f[R]
|
|
190
|
+
.PP
|
|
191
|
+
Bibliography is inserted at the \f[CR]<!\-\- REFERENCES \-\->\f[R]
|
|
192
|
+
marker or appended to the end of the document if no marker is found.
|
|
193
|
+
.SS General Options
|
|
194
|
+
.TP
|
|
195
|
+
\f[B]\-h\f[R], \f[B]\[en]help\f[R]
|
|
196
|
+
Show help message and exit.
|
|
197
|
+
.TP
|
|
198
|
+
\f[B]\-v\f[R], \f[B]\[en]version\f[R]
|
|
199
|
+
Show version information and exit.
|
|
200
|
+
.SH EXAMPLES
|
|
201
|
+
Process a markdown file:
|
|
202
|
+
.IP
|
|
203
|
+
.EX
|
|
204
|
+
apex input.md
|
|
205
|
+
.EE
|
|
206
|
+
.PP
|
|
207
|
+
Output to a file:
|
|
208
|
+
.IP
|
|
209
|
+
.EX
|
|
210
|
+
apex input.md \-o output.html
|
|
211
|
+
.EE
|
|
212
|
+
.PP
|
|
213
|
+
Generate standalone HTML document:
|
|
214
|
+
.IP
|
|
215
|
+
.EX
|
|
216
|
+
apex input.md \-\-standalone \-\-title \[dq]My Document\[dq]
|
|
217
|
+
.EE
|
|
218
|
+
.PP
|
|
219
|
+
Pretty\-print HTML output:
|
|
220
|
+
.IP
|
|
221
|
+
.EX
|
|
222
|
+
apex input.md \-\-pretty
|
|
223
|
+
.EE
|
|
224
|
+
.PP
|
|
225
|
+
Use GFM mode:
|
|
226
|
+
.IP
|
|
227
|
+
.EX
|
|
228
|
+
apex input.md \-\-mode gfm
|
|
229
|
+
.EE
|
|
230
|
+
.PP
|
|
231
|
+
Process document with citations and bibliography:
|
|
232
|
+
.IP
|
|
233
|
+
.EX
|
|
234
|
+
apex document.md \-\-bibliography refs.bib
|
|
235
|
+
.EE
|
|
236
|
+
.PP
|
|
237
|
+
Use metadata to specify bibliography:
|
|
238
|
+
.IP
|
|
239
|
+
.EX
|
|
240
|
+
apex document.md
|
|
241
|
+
.EE
|
|
242
|
+
.PP
|
|
243
|
+
(With bibliography specified in YAML front matter)
|
|
244
|
+
.PP
|
|
245
|
+
Use Kramdown mode with relaxed tables:
|
|
246
|
+
.IP
|
|
247
|
+
.EX
|
|
248
|
+
apex input.md \-\-mode kramdown
|
|
249
|
+
.EE
|
|
250
|
+
.PP
|
|
251
|
+
Process from stdin:
|
|
252
|
+
.IP
|
|
253
|
+
.EX
|
|
254
|
+
echo \[dq]# Hello\[dq] | apex
|
|
255
|
+
.EE
|
|
256
|
+
.SH PROCESSING MODES
|
|
257
|
+
.TP
|
|
258
|
+
\f[B]commonmark\f[R]
|
|
259
|
+
Pure CommonMark specification.
|
|
260
|
+
Minimal features, maximum compatibility.
|
|
261
|
+
.TP
|
|
262
|
+
\f[B]gfm\f[R]
|
|
263
|
+
GitHub Flavored Markdown.
|
|
264
|
+
Includes tables, strikethrough, task lists, autolinks, and more.
|
|
265
|
+
.TP
|
|
266
|
+
\f[B]mmd\f[R], \f[B]multimarkdown\f[R]
|
|
267
|
+
MultiMarkdown compatibility.
|
|
268
|
+
Includes metadata, definition lists, footnotes, and more.
|
|
269
|
+
.TP
|
|
270
|
+
\f[B]kramdown\f[R]
|
|
271
|
+
Kramdown compatibility.
|
|
272
|
+
Includes relaxed tables, IAL (Inline Attribute Lists), and more.
|
|
273
|
+
.TP
|
|
274
|
+
\f[B]unified\f[R] (default)
|
|
275
|
+
All features enabled.
|
|
276
|
+
Combines features from all modes.
|
|
277
|
+
.SH FEATURES
|
|
278
|
+
Apex supports a wide range of Markdown extensions:
|
|
279
|
+
.IP \[bu] 2
|
|
280
|
+
\f[B]Tables\f[R]: GFM\-style tables with alignment
|
|
281
|
+
.IP \[bu] 2
|
|
282
|
+
\f[B]Footnotes\f[R]: Reference\-style footnotes
|
|
283
|
+
.IP \[bu] 2
|
|
284
|
+
\f[B]Math\f[R]: Inline (\f[CR]$...$\f[R]) and display
|
|
285
|
+
(\f[CR]$$...$$\f[R]) math with LaTeX
|
|
286
|
+
.IP \[bu] 2
|
|
287
|
+
\f[B]Wiki Links\f[R]: \f[CR][[Page]]\f[R], \f[CR][[Page|Display]]\f[R],
|
|
288
|
+
\f[CR][[Page#Section]]\f[R]
|
|
289
|
+
.IP \[bu] 2
|
|
290
|
+
\f[B]Critic Markup\f[R]: All 5 types ({++add++}, {\[en]del\[en]},
|
|
291
|
+
{[STRIKEOUT:sub]}, {==mark==}, {>>comment<<})
|
|
292
|
+
.IP \[bu] 2
|
|
293
|
+
\f[B]Smart Typography\f[R]: Smart quotes, dashes, ellipsis
|
|
294
|
+
.IP \[bu] 2
|
|
295
|
+
\f[B]Definition Lists\f[R]: MultiMarkdown\-style definition lists
|
|
296
|
+
.IP \[bu] 2
|
|
297
|
+
\f[B]Task Lists\f[R]: GFM\-style task lists
|
|
298
|
+
.IP \[bu] 2
|
|
299
|
+
\f[B]Metadata\f[R]: YAML front matter, MultiMarkdown metadata, Pandoc
|
|
300
|
+
title blocks
|
|
301
|
+
.IP \[bu] 2
|
|
302
|
+
\f[B]Metadata Transforms\f[R]: Transform metadata values with
|
|
303
|
+
\f[CR][%key:transform]\f[R] syntax (case conversion, string
|
|
304
|
+
manipulation, regex replacement, date formatting, etc.)
|
|
305
|
+
.IP \[bu] 2
|
|
306
|
+
\f[B]Header IDs\f[R]: Automatic or manual header IDs with multiple
|
|
307
|
+
format options
|
|
308
|
+
.IP \[bu] 2
|
|
309
|
+
\f[B]Relaxed Tables\f[R]: Support for tables without separator rows
|
|
310
|
+
(Kramdown\-style)
|
|
311
|
+
.IP \[bu] 2
|
|
312
|
+
\f[B]Superscript/Subscript\f[R]: MultiMarkdown\-style superscript
|
|
313
|
+
(\f[CR]\[ha]text\f[R]) and subscript (\f[CR]\[ti]text\[ti]\f[R] within
|
|
314
|
+
words) syntax.
|
|
315
|
+
Subscript uses paired tildes within word boundaries (e.g.,
|
|
316
|
+
\f[CR]H\[ti]2\[ti]O\f[R]), while tildes at word boundaries create
|
|
317
|
+
underline
|
|
318
|
+
.IP \[bu] 2
|
|
319
|
+
\f[B]Image Embedding\f[R]: Embed local images as base64 data URLs with
|
|
320
|
+
\f[CR]\-\-embed\-images\f[R] flag
|
|
321
|
+
.SH SEE ALSO
|
|
322
|
+
For complete documentation, see the \c
|
|
323
|
+
.UR https://github.com/ttscoff/apex/wiki
|
|
324
|
+
Apex Wiki
|
|
325
|
+
.UE \c
|
|
326
|
+
\&.
|
|
327
|
+
.SH AUTHOR
|
|
328
|
+
Brett Terpstra
|
|
329
|
+
.SH COPYRIGHT
|
|
330
|
+
Copyright (c) 2025 Brett Terpstra.
|
|
331
|
+
Licensed under MIT License.
|
|
332
|
+
.SH BUGS
|
|
333
|
+
Report bugs at \c
|
|
334
|
+
.UR https://github.com/ttscoff/apex/issues
|
|
335
|
+
.UE \c
|
|
336
|
+
\&.
|
|
337
|
+
.SH AUTHORS
|
|
338
|
+
Brett Terpstra.
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apex.swift
|
|
3
|
+
* Swift API wrapper for Apex Markdown processor
|
|
4
|
+
* Provides idiomatic Swift interface over the Objective-C API
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import Foundation
|
|
8
|
+
@_exported import ApexObjC
|
|
9
|
+
|
|
10
|
+
/// Apex processor mode
|
|
11
|
+
/// Type-safe enum for processor modes
|
|
12
|
+
public enum ApexMode: String, CaseIterable {
|
|
13
|
+
case commonmark = "commonmark"
|
|
14
|
+
case gfm = "gfm"
|
|
15
|
+
case multimarkdown = "multimarkdown"
|
|
16
|
+
case kramdown = "kramdown"
|
|
17
|
+
case unified = "unified"
|
|
18
|
+
|
|
19
|
+
/// Convert to NSString for Objective-C API
|
|
20
|
+
internal var nsString: NSString {
|
|
21
|
+
return self.rawValue as NSString
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/// Apex conversion options
|
|
26
|
+
/// Swift struct for configuring conversion options
|
|
27
|
+
public struct ApexOptions {
|
|
28
|
+
/// Pretty-print HTML with indentation
|
|
29
|
+
public var pretty: Bool = false
|
|
30
|
+
|
|
31
|
+
/// Generate complete HTML5 document
|
|
32
|
+
public var standalone: Bool = false
|
|
33
|
+
|
|
34
|
+
/// Path to CSS file to link in document head
|
|
35
|
+
public var stylesheet: String? = nil
|
|
36
|
+
|
|
37
|
+
/// Document title
|
|
38
|
+
public var title: String? = nil
|
|
39
|
+
|
|
40
|
+
/// Treat newlines as hard breaks
|
|
41
|
+
public var hardBreaks: Bool = false
|
|
42
|
+
|
|
43
|
+
/// Generate IDs for headers
|
|
44
|
+
public var generateHeaderIDs: Bool = false
|
|
45
|
+
|
|
46
|
+
/// Allow raw HTML in output
|
|
47
|
+
public var unsafe: Bool = false
|
|
48
|
+
|
|
49
|
+
/// Generate anchor tags instead of header IDs
|
|
50
|
+
public var headerAnchors: Bool = false
|
|
51
|
+
|
|
52
|
+
/// Obfuscate email links using HTML entities
|
|
53
|
+
public var obfuscateEmails: Bool = false
|
|
54
|
+
|
|
55
|
+
/// Embed local images as base64 data URLs
|
|
56
|
+
public var embedImages: Bool = false
|
|
57
|
+
|
|
58
|
+
/// Default initializer
|
|
59
|
+
public init() {}
|
|
60
|
+
|
|
61
|
+
/// Default options
|
|
62
|
+
public static let `default` = ApexOptions()
|
|
63
|
+
|
|
64
|
+
/// Convert to NSDictionary for Objective-C API
|
|
65
|
+
internal func toDictionary() -> [String: Any] {
|
|
66
|
+
var dict: [String: Any] = [:]
|
|
67
|
+
|
|
68
|
+
if pretty {
|
|
69
|
+
dict["pretty"] = true
|
|
70
|
+
}
|
|
71
|
+
if standalone {
|
|
72
|
+
dict["standalone"] = true
|
|
73
|
+
}
|
|
74
|
+
if let stylesheet = stylesheet {
|
|
75
|
+
dict["stylesheet"] = stylesheet
|
|
76
|
+
}
|
|
77
|
+
if let title = title {
|
|
78
|
+
dict["title"] = title
|
|
79
|
+
}
|
|
80
|
+
if hardBreaks {
|
|
81
|
+
dict["hardBreaks"] = true
|
|
82
|
+
}
|
|
83
|
+
if generateHeaderIDs {
|
|
84
|
+
dict["generateHeaderIDs"] = true
|
|
85
|
+
}
|
|
86
|
+
if unsafe {
|
|
87
|
+
dict["unsafe"] = true
|
|
88
|
+
}
|
|
89
|
+
if headerAnchors {
|
|
90
|
+
dict["headerAnchors"] = true
|
|
91
|
+
}
|
|
92
|
+
if obfuscateEmails {
|
|
93
|
+
dict["obfuscateEmails"] = true
|
|
94
|
+
}
|
|
95
|
+
if embedImages {
|
|
96
|
+
dict["embedImages"] = true
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return dict
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/// String extension for Apex Markdown conversion
|
|
104
|
+
/// Provides idiomatic Swift API
|
|
105
|
+
extension String {
|
|
106
|
+
/**
|
|
107
|
+
* Convert Markdown to HTML using Apex in unified mode
|
|
108
|
+
*/
|
|
109
|
+
public func apexHTML() -> String {
|
|
110
|
+
return (self as NSString).apexHTML() as String
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Convert Markdown to HTML using Apex with specific mode
|
|
115
|
+
*/
|
|
116
|
+
public func apexHTML(mode: ApexMode) -> String {
|
|
117
|
+
return (self as NSString).apexHTML(withMode: mode.rawValue) as String
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Convert Markdown to HTML using Apex with mode and options
|
|
122
|
+
*/
|
|
123
|
+
public func apexHTML(mode: ApexMode = .unified, options: ApexOptions = .default) -> String {
|
|
124
|
+
let dict = options.toDictionary()
|
|
125
|
+
if dict.isEmpty {
|
|
126
|
+
// No options, use simple method
|
|
127
|
+
return (self as NSString).apexHTML(withMode: mode.rawValue)
|
|
128
|
+
} else {
|
|
129
|
+
// Use dictionary-based method
|
|
130
|
+
return NSString.convert(
|
|
131
|
+
withApex: self, mode: mode.rawValue, options: dict)
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Convert Markdown to HTML using Apex with standalone document options
|
|
137
|
+
*/
|
|
138
|
+
public func apexHTML(
|
|
139
|
+
mode: ApexMode = .unified, standalone: Bool, stylesheet: String? = nil, title: String? = nil
|
|
140
|
+
) -> String {
|
|
141
|
+
return NSString.convert(
|
|
142
|
+
withApex: self,
|
|
143
|
+
mode: mode.rawValue,
|
|
144
|
+
standalone: standalone,
|
|
145
|
+
stylesheet: stylesheet,
|
|
146
|
+
title: title
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Convert Markdown to HTML using Apex with pretty printing
|
|
152
|
+
* Convenience method for pretty-printing only
|
|
153
|
+
*/
|
|
154
|
+
public func apexHTML(pretty: Bool, mode: ApexMode = .unified) -> String {
|
|
155
|
+
return NSString.convert(withApex: self, mode: mode.rawValue, pretty: pretty)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Convert Markdown to HTML using Apex with common options
|
|
160
|
+
*/
|
|
161
|
+
public func apexHTML(
|
|
162
|
+
mode: ApexMode = .unified,
|
|
163
|
+
generateHeaderIDs: Bool,
|
|
164
|
+
hardBreaks: Bool,
|
|
165
|
+
pretty: Bool
|
|
166
|
+
) -> String {
|
|
167
|
+
return NSString.convert(
|
|
168
|
+
withApex: self,
|
|
169
|
+
mode: mode.rawValue,
|
|
170
|
+
generateHeaderIDs: generateHeaderIDs,
|
|
171
|
+
hardBreaks: hardBreaks,
|
|
172
|
+
pretty: pretty
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/// Static Apex converter
|
|
178
|
+
/// Provides static methods for conversion
|
|
179
|
+
public struct Apex {
|
|
180
|
+
/**
|
|
181
|
+
* Convert Markdown to HTML using Apex in unified mode
|
|
182
|
+
*/
|
|
183
|
+
public static func convert(_ markdown: String) -> String {
|
|
184
|
+
return markdown.apexHTML()
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Convert Markdown to HTML using Apex with specific mode
|
|
189
|
+
*/
|
|
190
|
+
public static func convert(_ markdown: String, mode: ApexMode) -> String {
|
|
191
|
+
return markdown.apexHTML(mode: mode)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Convert Markdown to HTML using Apex with mode and options
|
|
196
|
+
*/
|
|
197
|
+
public static func convert(
|
|
198
|
+
_ markdown: String, mode: ApexMode = .unified, options: ApexOptions = .default
|
|
199
|
+
) -> String {
|
|
200
|
+
return markdown.apexHTML(mode: mode, options: options)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Convert Markdown to HTML using Apex with standalone document options
|
|
205
|
+
*/
|
|
206
|
+
public static func convert(
|
|
207
|
+
_ markdown: String, mode: ApexMode = .unified, standalone: Bool, stylesheet: String? = nil,
|
|
208
|
+
title: String? = nil
|
|
209
|
+
) -> String {
|
|
210
|
+
return markdown.apexHTML(
|
|
211
|
+
mode: mode, standalone: standalone, stylesheet: stylesheet, title: title)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Convert Markdown to HTML using Apex with pretty printing
|
|
216
|
+
*/
|
|
217
|
+
public static func convert(_ markdown: String, pretty: Bool, mode: ApexMode = .unified)
|
|
218
|
+
-> String
|
|
219
|
+
{
|
|
220
|
+
return markdown.apexHTML(pretty: pretty, mode: mode)
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Convert Markdown to HTML using Apex with common options
|
|
225
|
+
*/
|
|
226
|
+
public static func convert(
|
|
227
|
+
_ markdown: String,
|
|
228
|
+
mode: ApexMode = .unified,
|
|
229
|
+
generateHeaderIDs: Bool,
|
|
230
|
+
hardBreaks: Bool,
|
|
231
|
+
pretty: Bool
|
|
232
|
+
) -> String {
|
|
233
|
+
return markdown.apexHTML(
|
|
234
|
+
mode: mode, generateHeaderIDs: generateHeaderIDs, hardBreaks: hardBreaks, pretty: pretty
|
|
235
|
+
)
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NSString+Apex.h
|
|
3
|
+
* Objective-C category for integrating Apex Markdown processor into Marked
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#import <Foundation/Foundation.h>
|
|
7
|
+
|
|
8
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Apex mode constants for use with convertWithApex:mode:
|
|
12
|
+
*/
|
|
13
|
+
extern NSString * const ApexModeCommonmark;
|
|
14
|
+
extern NSString * const ApexModeGFM;
|
|
15
|
+
extern NSString * const ApexModeMultiMarkdown;
|
|
16
|
+
extern NSString * const ApexModeKramdown;
|
|
17
|
+
extern NSString * const ApexModeUnified;
|
|
18
|
+
|
|
19
|
+
@interface NSString (Apex)
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Convert Markdown to HTML using Apex processor in unified mode
|
|
23
|
+
* @param inputString The markdown text to convert
|
|
24
|
+
* @return HTML string
|
|
25
|
+
*/
|
|
26
|
+
+ (NSString *)convertWithApex:(NSString *)inputString;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Convert Markdown to HTML using Apex with specific processor mode
|
|
30
|
+
* @param inputString The markdown text to convert
|
|
31
|
+
* @param mode Processor mode: Use ApexMode* constants (ApexModeCommonmark, ApexModeGFM, ApexModeMultiMarkdown, ApexModeKramdown, or ApexModeUnified) or string values: "commonmark", "gfm", "multimarkdown", "kramdown", or "unified"
|
|
32
|
+
* @return HTML string
|
|
33
|
+
*/
|
|
34
|
+
+ (NSString *)convertWithApex:(NSString *)inputString mode:(NSString *)mode;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Convert Markdown to HTML using Apex with standalone document options
|
|
38
|
+
* @param inputString The markdown text to convert
|
|
39
|
+
* @param mode Processor mode: Use ApexMode* constants or string values
|
|
40
|
+
* @param standalone If YES, generates a complete HTML5 document
|
|
41
|
+
* @param stylesheetPath Optional path to CSS file to link in document head (nil for none)
|
|
42
|
+
* @param title Optional document title (nil for default)
|
|
43
|
+
* @return HTML string (complete document if standalone is YES)
|
|
44
|
+
*/
|
|
45
|
+
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
46
|
+
mode:(NSString *)mode
|
|
47
|
+
standalone:(BOOL)standalone
|
|
48
|
+
stylesheet:(NSString * _Nullable)stylesheetPath
|
|
49
|
+
title:(NSString * _Nullable)title;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Convert Markdown to HTML using Apex with pretty printing option
|
|
53
|
+
* @param inputString The markdown text to convert
|
|
54
|
+
* @param mode Processor mode: Use ApexMode* constants or string values
|
|
55
|
+
* @param pretty If YES, pretty-prints HTML with indentation
|
|
56
|
+
* @return HTML string
|
|
57
|
+
*/
|
|
58
|
+
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
59
|
+
mode:(NSString *)mode
|
|
60
|
+
pretty:(BOOL)pretty;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Convert Markdown to HTML using Apex with dictionary-based options
|
|
64
|
+
* @param inputString The markdown text to convert
|
|
65
|
+
* @param mode Processor mode: Use ApexMode* constants or string values
|
|
66
|
+
* @param options Dictionary of option keys and values. Supported keys:
|
|
67
|
+
* - @"pretty": NSNumber (BOOL) - Pretty-print HTML
|
|
68
|
+
* - @"standalone": NSNumber (BOOL) - Generate complete HTML document
|
|
69
|
+
* - @"stylesheet": NSString - Path to CSS file
|
|
70
|
+
* - @"title": NSString - Document title
|
|
71
|
+
* - @"hardBreaks": NSNumber (BOOL) - Treat newlines as hard breaks
|
|
72
|
+
* - @"generateHeaderIDs": NSNumber (BOOL) - Generate IDs for headers
|
|
73
|
+
* - @"unsafe": NSNumber (BOOL) - Allow raw HTML
|
|
74
|
+
* - @"headerAnchors": NSNumber (BOOL) - Generate anchor tags instead of IDs
|
|
75
|
+
* - @"obfuscateEmails": NSNumber (BOOL) - Obfuscate email links
|
|
76
|
+
* - @"embedImages": NSNumber (BOOL) - Embed images as base64 data URLs
|
|
77
|
+
* @return HTML string
|
|
78
|
+
*/
|
|
79
|
+
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
80
|
+
mode:(NSString *)mode
|
|
81
|
+
options:(NSDictionary<NSString *, id> * _Nullable)options;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Convert Markdown to HTML using Apex with common options combined
|
|
85
|
+
* Swift-friendly method that combines frequently used options
|
|
86
|
+
* @param inputString The markdown text to convert
|
|
87
|
+
* @param mode Processor mode: Use ApexMode* constants or string values
|
|
88
|
+
* @param generateHeaderIDs If YES, generates IDs for headers
|
|
89
|
+
* @param hardBreaks If YES, treats newlines as hard breaks
|
|
90
|
+
* @param pretty If YES, pretty-prints HTML with indentation
|
|
91
|
+
* @return HTML string
|
|
92
|
+
*/
|
|
93
|
+
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
94
|
+
mode:(NSString *)mode
|
|
95
|
+
generateHeaderIDs:(BOOL)generateHeaderIDs
|
|
96
|
+
hardBreaks:(BOOL)hardBreaks
|
|
97
|
+
pretty:(BOOL)pretty;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Convert this string (as Markdown) to HTML using Apex in unified mode
|
|
101
|
+
* Instance method for convenient usage on NSString objects
|
|
102
|
+
* @return HTML string
|
|
103
|
+
*/
|
|
104
|
+
- (NSString *)apexHTML;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Convert this string (as Markdown) to HTML using Apex with specific mode
|
|
108
|
+
* Instance method for convenient usage on NSString objects
|
|
109
|
+
* @param mode Processor mode: Use ApexMode* constants or string values
|
|
110
|
+
* @return HTML string
|
|
111
|
+
*/
|
|
112
|
+
- (NSString *)apexHTMLWithMode:(NSString *)mode;
|
|
113
|
+
|
|
114
|
+
@end
|
|
115
|
+
|
|
116
|
+
NS_ASSUME_NONNULL_END
|
|
117
|
+
|