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,250 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# Minimal Apex pre-parse plugin for {% kbd ... %} syntax
|
|
3
|
+
#
|
|
4
|
+
# Protocol:
|
|
5
|
+
# - Reads a single JSON object from stdin:
|
|
6
|
+
# { "version": 1, "plugin_id": "...", "phase": "pre_parse", "text": "..." }
|
|
7
|
+
# - Writes the transformed markdown text to stdout (no JSON response).
|
|
8
|
+
#
|
|
9
|
+
# To use with Apex:
|
|
10
|
+
# export APEX_PRE_PARSE_PLUGIN="/usr/bin/env ruby /path/to/apex/examples/kbd_plugin.rb"
|
|
11
|
+
# apex input.md
|
|
12
|
+
|
|
13
|
+
require 'json'
|
|
14
|
+
|
|
15
|
+
payload = JSON.parse($stdin.read)
|
|
16
|
+
text = payload['text'] || ''
|
|
17
|
+
|
|
18
|
+
class String
|
|
19
|
+
def clean_combo
|
|
20
|
+
gsub!(/(?<=\S)-(?=\S)/, ' ')
|
|
21
|
+
gsub!(/\b(comm(and)?|cmd|clover)\b/i, '@')
|
|
22
|
+
gsub!(/\b(cont(rol)?|ctr?l)\b/i, '^')
|
|
23
|
+
gsub!(/\b(opt(ion)?|alt)\b/i, '~')
|
|
24
|
+
gsub!(/\bshift\b/i, '$')
|
|
25
|
+
gsub!(/\b(func(tion)?|fn)\b/i, '*')
|
|
26
|
+
gsub!(/\b(hyper)\b/i, '%')
|
|
27
|
+
self
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def lower_to_upper
|
|
31
|
+
doubles = [
|
|
32
|
+
[',', '<'], ['.', '>'], ['/', '?'], [';', ':'], ["'", '"'],
|
|
33
|
+
['[', '{'], [']', '}'], ['\\', '|'], ['-', '_'], ['=', '+']
|
|
34
|
+
]
|
|
35
|
+
lowers = doubles.map { |d| d[0] }
|
|
36
|
+
uppers = doubles.map { |d| d[1] }
|
|
37
|
+
lowers.include?(self) ? uppers[lowers.index(self)] : self
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def upper?
|
|
41
|
+
%w(< > ? : " { } | ! @ # $ % ^ & * \( \) _ +).include?(self)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def clean_combo!
|
|
45
|
+
replace clean_combo
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def to_mod
|
|
49
|
+
characters = {
|
|
50
|
+
'^' => '⌃',
|
|
51
|
+
'~' => '⌥',
|
|
52
|
+
'$' => '⇧',
|
|
53
|
+
'@' => '⌘',
|
|
54
|
+
'*' => 'Fn',
|
|
55
|
+
'%' => 'Hyper'
|
|
56
|
+
}
|
|
57
|
+
characters.key?(self) ? characters[self] : self
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def mod_to_ent(use_symbol)
|
|
61
|
+
entities = {
|
|
62
|
+
'⌃' => '⌃',
|
|
63
|
+
'⌥' => '⌥',
|
|
64
|
+
'⇧' => '⇧',
|
|
65
|
+
'⌘' => '⌘',
|
|
66
|
+
'Fn' => 'Fn',
|
|
67
|
+
'Hyper' => 'Hyper'
|
|
68
|
+
}
|
|
69
|
+
names = {
|
|
70
|
+
'⌃' => 'Control',
|
|
71
|
+
'⌥' => 'Option',
|
|
72
|
+
'⇧' => 'Shift',
|
|
73
|
+
'⌘' => 'Command',
|
|
74
|
+
'Fn' => 'Function',
|
|
75
|
+
'Hyper' => 'Hyper (Control+Option+Shift+Command)'
|
|
76
|
+
}
|
|
77
|
+
if entities.key?(self)
|
|
78
|
+
use_symbol ? entities[self] : names[self]
|
|
79
|
+
else
|
|
80
|
+
self
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def mod_to_title
|
|
85
|
+
entities = {
|
|
86
|
+
'⌃' => 'Control',
|
|
87
|
+
'⌥' => 'Option',
|
|
88
|
+
'⇧' => 'Shift',
|
|
89
|
+
'⌘' => 'Command',
|
|
90
|
+
'Fn' => 'Function',
|
|
91
|
+
'Hyper' => 'Hyper (Control+Option+Shift+Command)'
|
|
92
|
+
}
|
|
93
|
+
entities.key?(self) ? entities[self] : self
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def clarify_characters
|
|
97
|
+
unclear = {
|
|
98
|
+
',' => 'Comma (,)',
|
|
99
|
+
'.' => 'Period (.)',
|
|
100
|
+
';' => 'Semicolon (;)',
|
|
101
|
+
':' => 'Colon (:)',
|
|
102
|
+
'`' => 'Backtick (`)',
|
|
103
|
+
'-' => 'Minus Sign (-)',
|
|
104
|
+
'+' => 'Plus Sign (+)',
|
|
105
|
+
'=' => 'Equals Sign (=)',
|
|
106
|
+
'_' => 'Underscore (_)',
|
|
107
|
+
'~' => 'Tilde (~)',
|
|
108
|
+
'\\' => 'Backslash (\\)',
|
|
109
|
+
'|' => 'Pipe (|)',
|
|
110
|
+
'←' => 'Left Arrow (←)',
|
|
111
|
+
'→' => 'Right Arrow (→)',
|
|
112
|
+
'↑' => 'Up Arrow (↑)',
|
|
113
|
+
'↓' => 'Down Arrow (↓)'
|
|
114
|
+
}
|
|
115
|
+
unclear.fetch(self, self)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def name_to_ent(use_symbol)
|
|
119
|
+
k = case strip.downcase
|
|
120
|
+
when /^f(\d{1,2})$/
|
|
121
|
+
num = Regexp.last_match(1)
|
|
122
|
+
["F#{num}", "F#{num}", "F#{num} Key"]
|
|
123
|
+
when /^apple$/
|
|
124
|
+
['Apple', '', 'Apple menu']
|
|
125
|
+
when /^tab$/
|
|
126
|
+
['', '⇥', 'Tab Key']
|
|
127
|
+
when /^caps(lock)?$/
|
|
128
|
+
['Caps Lock', '⇪', 'Caps Lock Key']
|
|
129
|
+
when /^eject$/
|
|
130
|
+
['Eject', '⏏', 'Eject Key']
|
|
131
|
+
when /^return$/
|
|
132
|
+
['Return', '⏎', 'Return Key']
|
|
133
|
+
when /^enter$/
|
|
134
|
+
['Enter', '⌤', 'Enter (Fn Return) Key']
|
|
135
|
+
when /^(del(ete)?|back(space)?)$/
|
|
136
|
+
['Del', '⌫', 'Delete']
|
|
137
|
+
when /^fwddel(ete)?$/
|
|
138
|
+
['Fwd Del', '⌦', 'Forward Delete (Fn Delete)']
|
|
139
|
+
when /^(esc(ape)?)$/
|
|
140
|
+
['Esc', '⎋', 'Escape Key']
|
|
141
|
+
when /^(right|rt)$/
|
|
142
|
+
['Right Arrow', '→', 'Right Arrow Key']
|
|
143
|
+
when /^(left|lt)$/
|
|
144
|
+
['Left Arrow', '←', 'Left Arrow Key']
|
|
145
|
+
when /^up$/
|
|
146
|
+
['Up Arrow', '↑', 'Up Arrow Key']
|
|
147
|
+
when /^(down|dn)$/
|
|
148
|
+
['Down Arrow', '↓', 'Down Arrow Key']
|
|
149
|
+
when /^p(age|g)up$/
|
|
150
|
+
['PgUp', '⇞', 'Page Up Key']
|
|
151
|
+
when /^p(age|g)d(ow)?n$/
|
|
152
|
+
['PgDn', '⇟', 'Page Down Key']
|
|
153
|
+
when /^home$/
|
|
154
|
+
['Home', '↖', 'Home Key']
|
|
155
|
+
when /^end$/
|
|
156
|
+
['End', '↘', 'End Key']
|
|
157
|
+
when /^semi(colon)$/
|
|
158
|
+
['Semicolon', ';', 'Semicolon']
|
|
159
|
+
when /^(single([- ]?quote?)?|quote?)$/
|
|
160
|
+
['Single Quote', "'", 'Single Quote']
|
|
161
|
+
when /^double([- ]?quote?)?$/
|
|
162
|
+
['Double Quote', '"', 'Double Quote']
|
|
163
|
+
when /^click$/
|
|
164
|
+
['click', '<i class="fas fa-mouse-pointer"></i>', 'left click']
|
|
165
|
+
when /^hyper/i
|
|
166
|
+
['Hyper', 'Hyper', 'Hyper (Control+Option+Shift+Command)']
|
|
167
|
+
else
|
|
168
|
+
[self, self, capitalize]
|
|
169
|
+
end
|
|
170
|
+
use_symbol ? [k[1], k[2]] : [k[0], k[2]]
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
def render_kbd(markup, use_key_symbol: true, use_mod_symbol: true, use_plus: false)
|
|
175
|
+
combos = []
|
|
176
|
+
|
|
177
|
+
markup.split(%r{ / }).each do |combo|
|
|
178
|
+
mods = []
|
|
179
|
+
key = ''
|
|
180
|
+
combo.clean_combo!
|
|
181
|
+
combo.strip.split(//).each do |char|
|
|
182
|
+
next if char == ' '
|
|
183
|
+
case char
|
|
184
|
+
when /[⌃⇧⌥⌘]/
|
|
185
|
+
mods << char
|
|
186
|
+
when /[*\^$@~%]/
|
|
187
|
+
mods << char.to_mod
|
|
188
|
+
else
|
|
189
|
+
key << char
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
mods = sort_mods(mods)
|
|
193
|
+
title = ''
|
|
194
|
+
if key.length == 1
|
|
195
|
+
if mods.empty? && (key =~ /[A-Z]/ || key.upper?)
|
|
196
|
+
mods << '$'.to_mod
|
|
197
|
+
end
|
|
198
|
+
key = key.lower_to_upper if mods.include?('$'.to_mod)
|
|
199
|
+
key = key.upcase
|
|
200
|
+
title = key.clarify_characters
|
|
201
|
+
elsif mods.include?('$'.to_mod)
|
|
202
|
+
key = key.lower_to_upper
|
|
203
|
+
end
|
|
204
|
+
key.gsub!(/"/, '"')
|
|
205
|
+
combos << { mods: mods, key: key, title: title }
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
outputs = combos.map do |combo|
|
|
209
|
+
next if combo[:mods].empty? && combo[:key].empty?
|
|
210
|
+
kbds = []
|
|
211
|
+
title = []
|
|
212
|
+
|
|
213
|
+
combo[:mods].each do |mod|
|
|
214
|
+
mod_class = use_mod_symbol ? 'mod symbol' : 'mod'
|
|
215
|
+
kbds << %(<kbd class="#{mod_class}">#{mod.mod_to_ent(use_mod_symbol)}</kbd>)
|
|
216
|
+
title << mod.mod_to_title
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
unless combo[:key].empty?
|
|
220
|
+
key, keytitle = combo[:key].name_to_ent(use_key_symbol)
|
|
221
|
+
key_class = use_key_symbol ? 'key symbol' : 'key'
|
|
222
|
+
keytitle = keytitle.clarify_characters if keytitle.length == 1
|
|
223
|
+
kbds << %(<kbd class="#{key_class}">#{key}</kbd>)
|
|
224
|
+
title << keytitle
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
kbd = if use_mod_symbol
|
|
228
|
+
use_plus ? kbds.join('<span class="keycombo combiner">+</span>') : kbds.join
|
|
229
|
+
else
|
|
230
|
+
kbds.join('-')
|
|
231
|
+
end
|
|
232
|
+
span_class = "keycombo #{use_mod_symbol && !use_plus ? 'combined' : 'separated'}"
|
|
233
|
+
%(<span class="#{span_class}" title="#{title.join('-')}">#{kbd}</span>)
|
|
234
|
+
end.compact
|
|
235
|
+
|
|
236
|
+
outputs.join('<span class="keycombo separator">/</span>')
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
def sort_mods(mods)
|
|
240
|
+
order = ['Fn', '⌃', '⌥', '⇧', '⌘']
|
|
241
|
+
mods.uniq.sort { |a, b| order.index(a) < order.index(b) ? -1 : 1 }
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
result = text.gsub(/\{%\s*kbd\s+([^%]+)%\}/) do
|
|
245
|
+
markup = Regexp.last_match(1)
|
|
246
|
+
render_kbd(markup)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
print result
|
|
250
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apex - Unified Markdown Processor
|
|
3
|
+
*
|
|
4
|
+
* A comprehensive Markdown processor with support for CommonMark, GFM,
|
|
5
|
+
* MultiMarkdown, Kramdown, and Marked's special syntax extensions.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#ifndef APEX_H
|
|
9
|
+
#define APEX_H
|
|
10
|
+
|
|
11
|
+
#ifdef __cplusplus
|
|
12
|
+
extern "C" {
|
|
13
|
+
#endif
|
|
14
|
+
|
|
15
|
+
#include <stddef.h>
|
|
16
|
+
#include <stdbool.h>
|
|
17
|
+
|
|
18
|
+
#define APEX_VERSION_MAJOR 0
|
|
19
|
+
#define APEX_VERSION_MINOR 1
|
|
20
|
+
#define APEX_VERSION_PATCH 73
|
|
21
|
+
#define APEX_VERSION_STRING "0.1.73"
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Processor compatibility modes
|
|
25
|
+
*/
|
|
26
|
+
#ifndef APEX_MODE_DEFINED
|
|
27
|
+
#define APEX_MODE_DEFINED
|
|
28
|
+
typedef enum {
|
|
29
|
+
APEX_MODE_COMMONMARK = 0, /* Pure CommonMark spec */
|
|
30
|
+
APEX_MODE_GFM = 1, /* GitHub Flavored Markdown */
|
|
31
|
+
APEX_MODE_MULTIMARKDOWN = 2, /* MultiMarkdown compatibility */
|
|
32
|
+
APEX_MODE_KRAMDOWN = 3, /* Kramdown compatibility */
|
|
33
|
+
APEX_MODE_UNIFIED = 4 /* All features enabled */
|
|
34
|
+
} apex_mode_t;
|
|
35
|
+
#endif
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Configuration options for the parser and renderer
|
|
39
|
+
*/
|
|
40
|
+
typedef struct {
|
|
41
|
+
apex_mode_t mode;
|
|
42
|
+
|
|
43
|
+
/* Feature flags */
|
|
44
|
+
bool enable_plugins; /* Enable external/plugin processing */
|
|
45
|
+
bool enable_tables;
|
|
46
|
+
bool enable_footnotes;
|
|
47
|
+
bool enable_definition_lists;
|
|
48
|
+
bool enable_smart_typography;
|
|
49
|
+
bool enable_math;
|
|
50
|
+
bool enable_critic_markup;
|
|
51
|
+
bool enable_wiki_links;
|
|
52
|
+
bool enable_task_lists;
|
|
53
|
+
bool enable_attributes;
|
|
54
|
+
bool enable_callouts;
|
|
55
|
+
bool enable_marked_extensions;
|
|
56
|
+
bool enable_divs; /* Enable Pandoc fenced divs (Unified mode only) */
|
|
57
|
+
bool enable_spans; /* Enable bracketed spans [text]{IAL} (Pandoc-style) */
|
|
58
|
+
|
|
59
|
+
/* Critic markup mode */
|
|
60
|
+
int critic_mode; /* 0=markup (default), 1=accept, 2=reject */
|
|
61
|
+
|
|
62
|
+
/* Metadata handling */
|
|
63
|
+
bool strip_metadata;
|
|
64
|
+
bool enable_metadata_variables; /* [%key] replacement */
|
|
65
|
+
bool enable_metadata_transforms; /* [%key:transform] transforms */
|
|
66
|
+
|
|
67
|
+
/* File inclusion */
|
|
68
|
+
bool enable_file_includes;
|
|
69
|
+
int max_include_depth;
|
|
70
|
+
const char *base_directory;
|
|
71
|
+
|
|
72
|
+
/* Output options */
|
|
73
|
+
bool unsafe; /* Allow raw HTML */
|
|
74
|
+
bool validate_utf8;
|
|
75
|
+
bool github_pre_lang; /* Use GitHub code block language format */
|
|
76
|
+
bool standalone; /* Generate complete HTML document */
|
|
77
|
+
bool pretty; /* Pretty-print HTML with indentation */
|
|
78
|
+
const char **stylesheet_paths; /* NULL-terminated array of CSS file paths to link in head */
|
|
79
|
+
size_t stylesheet_count; /* Number of stylesheets */
|
|
80
|
+
const char *document_title; /* Title for HTML document */
|
|
81
|
+
|
|
82
|
+
/* Line break handling */
|
|
83
|
+
bool hardbreaks; /* Treat newlines as hard breaks (GFM style) */
|
|
84
|
+
bool nobreaks; /* Render soft breaks as spaces */
|
|
85
|
+
|
|
86
|
+
/* Header ID generation */
|
|
87
|
+
bool generate_header_ids; /* Generate IDs for headers */
|
|
88
|
+
bool header_anchors; /* Generate <a> anchor tags instead of header IDs */
|
|
89
|
+
int id_format; /* 0=GFM (with dashes), 1=MMD (no dashes) */
|
|
90
|
+
|
|
91
|
+
/* Table options */
|
|
92
|
+
bool relaxed_tables; /* Support tables without separator rows (kramdown/unified only) */
|
|
93
|
+
int caption_position; /* 0=above, 1=below (default: 1=below) */
|
|
94
|
+
bool per_cell_alignment; /* Enable per-cell alignment markers (colons at start/end of cells) */
|
|
95
|
+
|
|
96
|
+
/* List options */
|
|
97
|
+
bool allow_mixed_list_markers; /* Allow mixed list markers at same level (inherit type from first item) */
|
|
98
|
+
bool allow_alpha_lists; /* Support alpha list markers (a., b., c. and A., B., C.) */
|
|
99
|
+
|
|
100
|
+
/* Superscript and subscript */
|
|
101
|
+
bool enable_sup_sub; /* Support MultiMarkdown-style ^text^ and ~text~ syntax */
|
|
102
|
+
|
|
103
|
+
/* Strikethrough (GFM-style ~~text~~) */
|
|
104
|
+
bool enable_strikethrough;
|
|
105
|
+
|
|
106
|
+
/* Autolink options */
|
|
107
|
+
bool enable_autolink; /* Enable autolinking of URLs and email addresses */
|
|
108
|
+
bool obfuscate_emails; /* Obfuscate email links/text using HTML entities */
|
|
109
|
+
|
|
110
|
+
/* Image options */
|
|
111
|
+
bool embed_images; /* Embed local images as base64 data URLs */
|
|
112
|
+
bool enable_image_captions; /* Wrap images in <figure> with <figcaption> when alt/title present */
|
|
113
|
+
bool title_captions_only; /* When enable_image_captions is true, only add captions for images with a title attribute (ignore alt) */
|
|
114
|
+
|
|
115
|
+
/* Citation options */
|
|
116
|
+
bool enable_citations; /* Enable citation processing */
|
|
117
|
+
char **bibliography_files; /* NULL-terminated array of bibliography file paths */
|
|
118
|
+
const char *csl_file; /* CSL style file path */
|
|
119
|
+
bool suppress_bibliography; /* Suppress bibliography output */
|
|
120
|
+
bool link_citations; /* Link citations to bibliography entries */
|
|
121
|
+
bool show_tooltips; /* Show tooltips on citations */
|
|
122
|
+
const char *nocite; /* Comma-separated citation keys to include without citing, or "*" for all */
|
|
123
|
+
|
|
124
|
+
/* Index options */
|
|
125
|
+
bool enable_indices; /* Enable index processing */
|
|
126
|
+
bool enable_mmark_index_syntax; /* Enable mmark (!item) syntax */
|
|
127
|
+
bool enable_textindex_syntax; /* Enable TextIndex {^} syntax */
|
|
128
|
+
bool enable_leanpub_index_syntax; /* Enable Leanpub {i: "term"} syntax */
|
|
129
|
+
bool suppress_index; /* Suppress index output */
|
|
130
|
+
bool group_index_by_letter; /* Group index entries by first letter */
|
|
131
|
+
|
|
132
|
+
/* Wiki link options */
|
|
133
|
+
int wikilink_space; /* Space replacement: 0=dash, 1=none, 2=underscore, 3=space */
|
|
134
|
+
const char *wikilink_extension; /* File extension to append (e.g., "html") */
|
|
135
|
+
bool wikilink_sanitize; /* Sanitize URLs: lowercase, remove apostrophes, replace non-alnum */
|
|
136
|
+
|
|
137
|
+
/* Script injection options */
|
|
138
|
+
/* Raw <script>...</script> HTML snippets to inject either:
|
|
139
|
+
* - Before </body> when generating standalone HTML
|
|
140
|
+
* - At the end of the HTML fragment in snippet mode
|
|
141
|
+
*
|
|
142
|
+
* This is typically populated by the CLI --script flag.
|
|
143
|
+
*/
|
|
144
|
+
char **script_tags; /* NULL-terminated array of script tag strings (may be NULL for none) */
|
|
145
|
+
|
|
146
|
+
/* Stylesheet embedding options */
|
|
147
|
+
/* When true and a stylesheet path is provided, Apex will attempt to
|
|
148
|
+
* read the CSS file and embed it directly into a <style> block in the
|
|
149
|
+
* document head instead of emitting a <link rel="stylesheet"> tag.
|
|
150
|
+
* This is typically enabled via the CLI --embed-css flag.
|
|
151
|
+
*/
|
|
152
|
+
bool embed_stylesheet;
|
|
153
|
+
|
|
154
|
+
/* ARIA accessibility options */
|
|
155
|
+
bool enable_aria; /* Add ARIA labels and accessibility attributes to HTML output */
|
|
156
|
+
|
|
157
|
+
/* Emoji options */
|
|
158
|
+
bool enable_emoji_autocorrect; /* Enable emoji name autocorrect (enabled by default in unified mode) */
|
|
159
|
+
|
|
160
|
+
/* Syntax highlighting options */
|
|
161
|
+
const char *code_highlighter; /* External tool: "pygments", "skylighting", or NULL for no highlighting */
|
|
162
|
+
bool code_line_numbers; /* Enable line numbers in syntax-highlighted code blocks */
|
|
163
|
+
bool highlight_language_only; /* Only highlight code blocks that have a language specified */
|
|
164
|
+
|
|
165
|
+
/* Marked / integration-specific options */
|
|
166
|
+
bool enable_widont; /* Apply widont to headings (prevent short widows) */
|
|
167
|
+
bool code_is_poetry; /* Treat unlanguaged code blocks as poetry */
|
|
168
|
+
bool enable_markdown_in_html; /* Process markdown inside HTML when enabled */
|
|
169
|
+
bool random_footnote_ids; /* Use hash-based/randomized footnote IDs */
|
|
170
|
+
bool enable_hashtags; /* Convert #tags to span-marked hashtags */
|
|
171
|
+
bool style_hashtags; /* Use styled hashtag class instead of basic */
|
|
172
|
+
bool proofreader_mode; /* Convert == / ~~ to CriticMarkup syntax */
|
|
173
|
+
bool hr_page_break; /* Replace <hr> with page break divs */
|
|
174
|
+
bool title_from_h1; /* Use first H1 as document title fallback */
|
|
175
|
+
bool page_break_before_footnotes; /* Insert page break before footnotes section */
|
|
176
|
+
|
|
177
|
+
/* Source file information for plugins */
|
|
178
|
+
/* When Apex is invoked on a file, this is the full path to that file. */
|
|
179
|
+
/* When reading from stdin, this is either the base directory (if set) or empty. */
|
|
180
|
+
const char *input_file_path;
|
|
181
|
+
|
|
182
|
+
/* Progress reporting callback */
|
|
183
|
+
/* Called during processing to report progress. Parameters:
|
|
184
|
+
* - stage: Description of current processing stage (e.g., "Processing tables", "Running plugin: kbd")
|
|
185
|
+
* - percent: Progress percentage (0-100), or -1 if unknown
|
|
186
|
+
* - user_data: User-provided context (can be NULL)
|
|
187
|
+
* If NULL, no progress reporting is performed.
|
|
188
|
+
*/
|
|
189
|
+
void (*progress_callback)(const char *stage, int percent, void *user_data);
|
|
190
|
+
void *progress_user_data; /* User data passed to progress callback */
|
|
191
|
+
} apex_options;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Get default options for a specific mode
|
|
195
|
+
*/
|
|
196
|
+
apex_options apex_options_default(void);
|
|
197
|
+
apex_options apex_options_for_mode(apex_mode_t mode);
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Main conversion function: Markdown to HTML
|
|
201
|
+
*
|
|
202
|
+
* @param markdown Input markdown text
|
|
203
|
+
* @param len Length of input text
|
|
204
|
+
* @param options Processing options (NULL for defaults)
|
|
205
|
+
* @return Newly allocated HTML string (must be freed with apex_free_string)
|
|
206
|
+
*/
|
|
207
|
+
char *apex_markdown_to_html(const char *markdown, size_t len, const apex_options *options);
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Wrap HTML content in complete HTML5 document structure
|
|
211
|
+
*
|
|
212
|
+
* @param content HTML content to wrap
|
|
213
|
+
* @param title Document title (NULL for default)
|
|
214
|
+
* @param stylesheet_paths NULL-terminated array of CSS file paths to link in head
|
|
215
|
+
* @param html_header Raw HTML to insert in <head> section (NULL for none)
|
|
216
|
+
* @param html_footer Raw HTML to append before </body> (NULL for none)
|
|
217
|
+
* @param language Language code for <html lang> attribute (NULL for "en")
|
|
218
|
+
* @return Newly allocated HTML document string (must be freed with apex_free_string)
|
|
219
|
+
*/
|
|
220
|
+
char *apex_wrap_html_document(const char *content, const char *title, const char **stylesheet_paths, size_t stylesheet_count, const char *code_highlighter, const char *html_header, const char *html_footer, const char *language);
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Pretty-print HTML with proper indentation
|
|
224
|
+
*
|
|
225
|
+
* @param html HTML to format
|
|
226
|
+
* @return Newly allocated formatted HTML string (must be freed with apex_free_string)
|
|
227
|
+
*/
|
|
228
|
+
char *apex_pretty_print_html(const char *html);
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Free a string allocated by Apex
|
|
232
|
+
*/
|
|
233
|
+
void apex_free_string(char *str);
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Get version information
|
|
237
|
+
*/
|
|
238
|
+
const char *apex_version_string(void);
|
|
239
|
+
int apex_version_major(void);
|
|
240
|
+
int apex_version_minor(void);
|
|
241
|
+
int apex_version_patch(void);
|
|
242
|
+
|
|
243
|
+
#ifdef __cplusplus
|
|
244
|
+
}
|
|
245
|
+
#endif
|
|
246
|
+
|
|
247
|
+
#endif /* APEX_H */
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file buffer.h
|
|
3
|
+
* @brief Dynamic string buffer for efficient string building
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#ifndef APEX_BUFFER_H
|
|
7
|
+
#define APEX_BUFFER_H
|
|
8
|
+
|
|
9
|
+
#ifdef __cplusplus
|
|
10
|
+
extern "C" {
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
#include <stddef.h>
|
|
14
|
+
#include <stdbool.h>
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Dynamic buffer structure
|
|
18
|
+
*/
|
|
19
|
+
typedef struct {
|
|
20
|
+
char *data; /**< Buffer data */
|
|
21
|
+
size_t size; /**< Current size */
|
|
22
|
+
size_t capacity; /**< Allocated capacity */
|
|
23
|
+
} apex_buffer;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Initialize a buffer
|
|
27
|
+
*
|
|
28
|
+
* @param buf Buffer to initialize
|
|
29
|
+
* @param initial_capacity Initial capacity
|
|
30
|
+
*/
|
|
31
|
+
void apex_buffer_init(apex_buffer *buf, size_t initial_capacity);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Free buffer resources
|
|
35
|
+
*
|
|
36
|
+
* @param buf Buffer to free
|
|
37
|
+
*/
|
|
38
|
+
void apex_buffer_free(apex_buffer *buf);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Clear buffer contents
|
|
42
|
+
*
|
|
43
|
+
* @param buf Buffer to clear
|
|
44
|
+
*/
|
|
45
|
+
void apex_buffer_clear(apex_buffer *buf);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Append string to buffer
|
|
49
|
+
*
|
|
50
|
+
* @param buf Buffer
|
|
51
|
+
* @param data String to append
|
|
52
|
+
* @param len Length of string
|
|
53
|
+
*/
|
|
54
|
+
void apex_buffer_append(apex_buffer *buf, const char *data, size_t len);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Append null-terminated string to buffer
|
|
58
|
+
*
|
|
59
|
+
* @param buf Buffer
|
|
60
|
+
* @param str String to append
|
|
61
|
+
*/
|
|
62
|
+
void apex_buffer_append_str(apex_buffer *buf, const char *str);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Append single character to buffer
|
|
66
|
+
*
|
|
67
|
+
* @param buf Buffer
|
|
68
|
+
* @param c Character to append
|
|
69
|
+
*/
|
|
70
|
+
void apex_buffer_append_char(apex_buffer *buf, char c);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Get buffer contents as string
|
|
74
|
+
*
|
|
75
|
+
* @param buf Buffer
|
|
76
|
+
* @return Null-terminated string (do not free)
|
|
77
|
+
*/
|
|
78
|
+
const char *apex_buffer_cstr(const apex_buffer *buf);
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Detach buffer data (caller must free)
|
|
82
|
+
*
|
|
83
|
+
* @param buf Buffer
|
|
84
|
+
* @return Buffer data (must be freed with free())
|
|
85
|
+
*/
|
|
86
|
+
char *apex_buffer_detach(apex_buffer *buf);
|
|
87
|
+
|
|
88
|
+
#ifdef __cplusplus
|
|
89
|
+
}
|
|
90
|
+
#endif
|
|
91
|
+
|
|
92
|
+
#endif /* APEX_BUFFER_H */
|
|
93
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Apex {
|
|
2
|
+
umbrella header "apex.h"
|
|
3
|
+
explicit module parser {
|
|
4
|
+
header "parser.h"
|
|
5
|
+
export *
|
|
6
|
+
}
|
|
7
|
+
explicit module renderer {
|
|
8
|
+
header "renderer.h"
|
|
9
|
+
export *
|
|
10
|
+
}
|
|
11
|
+
explicit module buffer {
|
|
12
|
+
header "buffer.h"
|
|
13
|
+
export *
|
|
14
|
+
}
|
|
15
|
+
export *
|
|
16
|
+
}
|