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,260 @@
|
|
|
1
|
+
% APEX-CONFIG(5)
|
|
2
|
+
% Brett Terpstra
|
|
3
|
+
% December 2025
|
|
4
|
+
|
|
5
|
+
# NAME
|
|
6
|
+
|
|
7
|
+
apex-config - Apex configuration file format
|
|
8
|
+
|
|
9
|
+
# DESCRIPTION
|
|
10
|
+
|
|
11
|
+
Apex supports flexible configuration through metadata files that allow you to define defaults once and reuse them across many documents, while still allowing per-document and per-invocation overrides.
|
|
12
|
+
|
|
13
|
+
Configuration can come from three main sources:
|
|
14
|
+
|
|
15
|
+
1. **Global configuration file** - `$XDG_CONFIG_HOME/apex/config.yml` or `~/.config/apex/config.yml`
|
|
16
|
+
2. **External metadata files** - Any file passed via `--meta-file`
|
|
17
|
+
3. **Per-document metadata** - YAML, MultiMarkdown, or Pandoc-style metadata in the document
|
|
18
|
+
|
|
19
|
+
Command-line flags always override configuration file settings.
|
|
20
|
+
|
|
21
|
+
# GLOBAL CONFIG FILE
|
|
22
|
+
|
|
23
|
+
When you run **apex**(1) without an explicit `--meta-file`, Apex automatically checks for a global configuration file:
|
|
24
|
+
|
|
25
|
+
- If `$XDG_CONFIG_HOME` is set: `$XDG_CONFIG_HOME/apex/config.yml`
|
|
26
|
+
- Otherwise: `~/.config/apex/config.yml`
|
|
27
|
+
|
|
28
|
+
If the file exists, Apex loads it as if you had passed it via `--meta-file`, and merges its metadata with the document and any `--meta` command-line metadata.
|
|
29
|
+
|
|
30
|
+
This makes `config.yml` ideal for defining project-agnostic defaults such as:
|
|
31
|
+
|
|
32
|
+
- Default `mode` (e.g. `unified`, `gfm`, `mmd`)
|
|
33
|
+
- Default `language` and `quoteslanguage`
|
|
34
|
+
- Common feature flags (`pretty`, `standalone`, `indices`, `wikilinks`, etc.)
|
|
35
|
+
- Default bibliography style
|
|
36
|
+
|
|
37
|
+
## Example `config.yml`
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
---
|
|
41
|
+
# Default processor mode and output style
|
|
42
|
+
mode: unified
|
|
43
|
+
standalone: true
|
|
44
|
+
pretty: true
|
|
45
|
+
|
|
46
|
+
# Locale and quotation style
|
|
47
|
+
language: en
|
|
48
|
+
quoteslanguage: english
|
|
49
|
+
|
|
50
|
+
# Common feature flags
|
|
51
|
+
autolink: true
|
|
52
|
+
includes: true
|
|
53
|
+
relaxed-tables: true
|
|
54
|
+
sup-sub: true
|
|
55
|
+
|
|
56
|
+
# Index and bibliography defaults
|
|
57
|
+
indices: true
|
|
58
|
+
group-index-by-letter: true
|
|
59
|
+
bibliography: references.bib
|
|
60
|
+
csl: apa.csl
|
|
61
|
+
|
|
62
|
+
# Syntax highlighting (optional)
|
|
63
|
+
code-highlight: pygments
|
|
64
|
+
code-line-numbers: true
|
|
65
|
+
highlight-language-only: true
|
|
66
|
+
---
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
# EXTERNAL METADATA FILES
|
|
70
|
+
|
|
71
|
+
For project-specific or task-specific configurations, use `--meta-file` to point to a reusable metadata file:
|
|
72
|
+
|
|
73
|
+
apex document.md --meta-file project-defaults.yml
|
|
74
|
+
|
|
75
|
+
These files use the same metadata keys as `config.yml` and document front matter.
|
|
76
|
+
|
|
77
|
+
## Example project config
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
---
|
|
81
|
+
mode: unified
|
|
82
|
+
standalone: true
|
|
83
|
+
pretty: true
|
|
84
|
+
|
|
85
|
+
# Project-specific bibliography
|
|
86
|
+
bibliography: project-refs.bib
|
|
87
|
+
csl: chicago-note-bibliography.csl
|
|
88
|
+
|
|
89
|
+
# Enable wiki links and relaxed tables for this project
|
|
90
|
+
wikilinks: true
|
|
91
|
+
relaxed-tables: true
|
|
92
|
+
---
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
# PER-DOCUMENT METADATA
|
|
96
|
+
|
|
97
|
+
Each document can define its own metadata in YAML, MultiMarkdown, or Pandoc formats. Apex extracts this metadata before processing, merges it with any file/config metadata, and then applies it to options.
|
|
98
|
+
|
|
99
|
+
## YAML front matter example
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
---
|
|
103
|
+
title: My Research Paper
|
|
104
|
+
author: Jane Doe
|
|
105
|
+
mode: unified
|
|
106
|
+
standalone: true
|
|
107
|
+
pretty: true
|
|
108
|
+
indices: false
|
|
109
|
+
wikilinks: true
|
|
110
|
+
bibliography: references.bib
|
|
111
|
+
language: en
|
|
112
|
+
quoteslanguage: english
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
# Introduction
|
|
116
|
+
...
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## MultiMarkdown metadata example
|
|
120
|
+
|
|
121
|
+
```markdown
|
|
122
|
+
Title: My Research Paper
|
|
123
|
+
Author: Jane Doe
|
|
124
|
+
Mode: unified
|
|
125
|
+
Standalone: true
|
|
126
|
+
Pretty: true
|
|
127
|
+
Indices: false
|
|
128
|
+
WikiLinks: true
|
|
129
|
+
Bibliography: references.bib
|
|
130
|
+
Language: en
|
|
131
|
+
Quotes Language: english
|
|
132
|
+
|
|
133
|
+
# Introduction
|
|
134
|
+
...
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Apex normalizes keys (case-insensitive, ignores spaces and dashes), so `Quotes Language`, `quoteslanguage`, and `quotes-language` are treated equivalently.
|
|
138
|
+
|
|
139
|
+
# PRECEDENCE AND MERGING
|
|
140
|
+
|
|
141
|
+
When Apex builds the final configuration for a run, it merges all sources in this order:
|
|
142
|
+
|
|
143
|
+
1. **File metadata** (lowest precedence)
|
|
144
|
+
- Global `config.yml` if present and no explicit `--meta-file` was given
|
|
145
|
+
- Any metadata file provided via `--meta-file`
|
|
146
|
+
2. **Document metadata**
|
|
147
|
+
- YAML/MultiMarkdown/Pandoc metadata inside the document
|
|
148
|
+
3. **Command-line metadata**
|
|
149
|
+
- Values passed via `--meta KEY=VALUE`
|
|
150
|
+
4. **Command-line flags**
|
|
151
|
+
- Flags like `--mode`, `--pretty`, `--no-tables`, etc.
|
|
152
|
+
|
|
153
|
+
Later sources override earlier ones. In practice:
|
|
154
|
+
|
|
155
|
+
- A document can override defaults from `config.yml` or `--meta-file`
|
|
156
|
+
- `--meta` values can override both document and file metadata
|
|
157
|
+
- Explicit CLI flags still behave as final overrides where applicable
|
|
158
|
+
|
|
159
|
+
**Note:** If `mode` is specified in metadata (file or document), Apex resets options to that mode's defaults before applying other metadata keys, so the mode behaves as if you had passed it on the command line first.
|
|
160
|
+
|
|
161
|
+
# CONFIGURATION KEYS
|
|
162
|
+
|
|
163
|
+
Configuration keys correspond closely to Apex command-line options. Most options can be controlled via metadata in `config.yml`, `--meta-file` files, or per-document metadata.
|
|
164
|
+
|
|
165
|
+
## Boolean options
|
|
166
|
+
|
|
167
|
+
Boolean keys accept any of the following values (case-insensitive):
|
|
168
|
+
|
|
169
|
+
- `true` / `false`
|
|
170
|
+
- `yes` / `no`
|
|
171
|
+
- `1` / `0`
|
|
172
|
+
|
|
173
|
+
**Supported boolean keys include:**
|
|
174
|
+
|
|
175
|
+
- `indices` - Enable index processing
|
|
176
|
+
- `wikilinks` - Enable wiki link syntax (`[[Page]]`)
|
|
177
|
+
- `wikilink-sanitize` - Sanitize wiki link URLs (lowercase, remove apostrophes, clean non-alphanumeric)
|
|
178
|
+
- `includes` - Enable file inclusion
|
|
179
|
+
- `relaxed-tables` - Enable relaxed table parsing
|
|
180
|
+
- `alpha-lists` - Enable alphabetic list markers
|
|
181
|
+
- `mixed-lists` - Allow mixing list marker types at the same level
|
|
182
|
+
- `sup-sub` - Enable MultiMarkdown-style superscript/subscript
|
|
183
|
+
- `autolink` - Enable automatic URL/email linking
|
|
184
|
+
- `transforms` - Enable metadata transforms (`[%key:transform]`)
|
|
185
|
+
- `unsafe` - Allow raw HTML in output
|
|
186
|
+
- `tables` - Enable/disable table support
|
|
187
|
+
- `footnotes` - Enable/disable footnote support
|
|
188
|
+
- `smart` - Enable/disable smart typography
|
|
189
|
+
- `math` - Enable/disable math support
|
|
190
|
+
- `ids` - Enable/disable automatic header IDs
|
|
191
|
+
- `header-anchors` - Use `<a>` anchors instead of plain `id` attributes
|
|
192
|
+
- `embed-images` - Enable base64 image embedding
|
|
193
|
+
- `link-citations` - Link citations to bibliography entries
|
|
194
|
+
- `show-tooltips` - Add tooltips to citations
|
|
195
|
+
- `suppress-bibliography` - Suppress bibliography output
|
|
196
|
+
- `suppress-index` - Suppress index output while still creating markers
|
|
197
|
+
- `group-index-by-letter` - Group index entries alphabetically
|
|
198
|
+
- `obfuscate-emails` - Hex-encode `mailto:` links and visible email addresses
|
|
199
|
+
- `pretty` - Pretty-print HTML
|
|
200
|
+
- `standalone` - Generate a full HTML document (`<html>`, `<head>`, `<body>`)
|
|
201
|
+
- `hardbreaks` - Treat newlines as `<br>`
|
|
202
|
+
- `plugins` - Enable plugin processing (see **apex-plugins**(7))
|
|
203
|
+
- `code-line-numbers` - Include line numbers in syntax-highlighted code blocks
|
|
204
|
+
- `highlight-language-only` - Only highlight code blocks that have a language specified
|
|
205
|
+
|
|
206
|
+
## String options
|
|
207
|
+
|
|
208
|
+
String keys take a free-form string value (sometimes with a constrained set of options):
|
|
209
|
+
|
|
210
|
+
- `mode`
|
|
211
|
+
- Values: `commonmark`, `gfm`, `mmd`/`multimarkdown`, `kramdown`, `unified`
|
|
212
|
+
- `id-format`
|
|
213
|
+
- Values: `gfm`, `mmd`, `kramdown`
|
|
214
|
+
- `title`
|
|
215
|
+
- Document title (used especially in standalone mode)
|
|
216
|
+
- `style` / `css`
|
|
217
|
+
- Stylesheet path for standalone documents
|
|
218
|
+
- `base-dir`
|
|
219
|
+
- Base directory used for resolving relative paths (images, includes, etc.)
|
|
220
|
+
- `bibliography`
|
|
221
|
+
- Path to a bibliography file (`.bib`, `.json`, `.yml`, `.yaml`)
|
|
222
|
+
- `csl`
|
|
223
|
+
- Path to a CSL style file
|
|
224
|
+
- `language`
|
|
225
|
+
- BCP 47 or similar language tag (e.g. `en`, `en-US`, `fr`); sets the HTML `lang` attribute
|
|
226
|
+
- `quoteslanguage` / `Quotes Language`
|
|
227
|
+
- Human-readable language name used for quote styling (e.g. `english`, `french`, `german`)
|
|
228
|
+
- `code-highlight`
|
|
229
|
+
- External syntax highlighting tool: `pygments` (or `p`/`pyg`), `skylighting` (or `s`/`sky`), or `false`/`none` to disable
|
|
230
|
+
|
|
231
|
+
You can also use arbitrary keys for your own templates and transforms; Apex simply passes them through to the metadata system so they can be referenced via `[%key]` and `[%key:transform]`.
|
|
232
|
+
|
|
233
|
+
# EXAMPLES
|
|
234
|
+
|
|
235
|
+
A typical setup might look like this:
|
|
236
|
+
|
|
237
|
+
1. **Global defaults** in `config.yml` for your overall writing style and locale.
|
|
238
|
+
2. **Project config** via `--meta-file project.yml` for bibliography and project-specific settings.
|
|
239
|
+
3. **Per-document metadata** for title, author, and any exceptions to the defaults.
|
|
240
|
+
4. Occasional **CLI overrides** for ad-hoc one-off changes (e.g. `--mode gfm` for a specific run).
|
|
241
|
+
|
|
242
|
+
Because all three configuration layers use the same metadata keys, you can gradually refine behavior without repeating yourself:
|
|
243
|
+
|
|
244
|
+
- Put long-lived, cross-project settings in `config.yml`
|
|
245
|
+
- Put project-scoped settings in `--meta-file` configs
|
|
246
|
+
- Put document-specific settings in front matter
|
|
247
|
+
|
|
248
|
+
# SEE ALSO
|
|
249
|
+
|
|
250
|
+
**apex**(1), **apex-plugins**(7)
|
|
251
|
+
|
|
252
|
+
For complete documentation, see the [Apex Wiki](https://github.com/ttscoff/apex/wiki).
|
|
253
|
+
|
|
254
|
+
# AUTHOR
|
|
255
|
+
|
|
256
|
+
Brett Terpstra
|
|
257
|
+
|
|
258
|
+
# COPYRIGHT
|
|
259
|
+
|
|
260
|
+
Copyright (c) 2025 Brett Terpstra. Licensed under MIT License.
|
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
.\" Automatically generated by Pandoc 3.8.3
|
|
2
|
+
.\"
|
|
3
|
+
.TH "APEX\-PLUGINS" "7" "December 2025" ""
|
|
4
|
+
.SH NAME
|
|
5
|
+
apex\-plugins \- Apex plugin system for extending Markdown processing
|
|
6
|
+
.SH DESCRIPTION
|
|
7
|
+
Apex supports a lightweight plugin system that lets you add new syntax
|
|
8
|
+
and post\-processing behavior without patching the core.
|
|
9
|
+
Plugins can be small scripts (Ruby, Python, etc.)
|
|
10
|
+
or simple declarative regex rules defined in YAML.
|
|
11
|
+
.PP
|
|
12
|
+
Plugins are disabled by default so Apex\(cqs performance and behavior
|
|
13
|
+
are unchanged unless you explicitly opt in.
|
|
14
|
+
.SH ENABLING PLUGINS
|
|
15
|
+
.SS Command\-line flags
|
|
16
|
+
.IP \(bu 2
|
|
17
|
+
\f[B]Enable plugins\f[R]: \f[CR]apex \-\-plugins input.md\f[R]
|
|
18
|
+
.IP \(bu 2
|
|
19
|
+
\f[B]Disable plugins\f[R]: \f[CR]apex \-\-no\-plugins input.md\f[R]
|
|
20
|
+
.SS Metadata keys
|
|
21
|
+
In the document\(cqs front matter, any of these keys are recognized
|
|
22
|
+
(case\-insensitive):
|
|
23
|
+
.IP \(bu 2
|
|
24
|
+
\f[CR]plugins\f[R]
|
|
25
|
+
.IP \(bu 2
|
|
26
|
+
\f[CR]enable\-plugins\f[R]
|
|
27
|
+
.IP \(bu 2
|
|
28
|
+
\f[CR]enable_plugins\f[R]
|
|
29
|
+
.PP
|
|
30
|
+
Example:
|
|
31
|
+
.IP
|
|
32
|
+
.EX
|
|
33
|
+
\-\-\-
|
|
34
|
+
title\f[B]:\f[R] Plugin demo
|
|
35
|
+
plugins\f[B]:\f[R] true
|
|
36
|
+
\-\-\-
|
|
37
|
+
.EE
|
|
38
|
+
.SS Precedence
|
|
39
|
+
If metadata enables or disables plugins, you can still override it from
|
|
40
|
+
the CLI:
|
|
41
|
+
.IP \(bu 2
|
|
42
|
+
\f[CR]\-\-plugins\f[R] forces plugins \f[B]on\f[R]
|
|
43
|
+
.IP \(bu 2
|
|
44
|
+
\f[CR]\-\-no\-plugins\f[R] forces plugins \f[B]off\f[R]
|
|
45
|
+
.PP
|
|
46
|
+
CLI flags always win over metadata.
|
|
47
|
+
.SH PLUGIN LOCATIONS
|
|
48
|
+
Plugins are discovered from two locations, in this order:
|
|
49
|
+
.IP "1." 3
|
|
50
|
+
\f[B]Project\-local plugins\f[R]
|
|
51
|
+
.RS 4
|
|
52
|
+
.IP \(bu 2
|
|
53
|
+
Directory: \f[CR].apex/plugins/\f[R] in the same project as your
|
|
54
|
+
documents
|
|
55
|
+
.IP \(bu 2
|
|
56
|
+
Structure: one subdirectory per plugin, for example:
|
|
57
|
+
.RS 2
|
|
58
|
+
.IP \(bu 2
|
|
59
|
+
\f[CR].apex/plugins/kbd/plugin.yml\f[R]
|
|
60
|
+
.IP \(bu 2
|
|
61
|
+
\f[CR].apex/plugins/kbd/kbd_plugin.rb\f[R]
|
|
62
|
+
.RE
|
|
63
|
+
.RE
|
|
64
|
+
.IP "2." 3
|
|
65
|
+
\f[B]Global (user) plugins\f[R]
|
|
66
|
+
.RS 4
|
|
67
|
+
.IP \(bu 2
|
|
68
|
+
If \f[CR]$XDG_CONFIG_HOME\f[R] is set:
|
|
69
|
+
\f[CR]$XDG_CONFIG_HOME/apex/plugins/\f[R]
|
|
70
|
+
.IP \(bu 2
|
|
71
|
+
Otherwise: \f[CR]\(ti/.config/apex/plugins/\f[R]
|
|
72
|
+
.IP \(bu 2
|
|
73
|
+
Same structure: one subdirectory per plugin
|
|
74
|
+
.RE
|
|
75
|
+
.PP
|
|
76
|
+
\f[B]Plugin IDs must be unique.\f[R] If a project plugin and a global
|
|
77
|
+
plugin share the same \f[CR]id\f[R], the project plugin wins and the
|
|
78
|
+
global one is ignored.
|
|
79
|
+
.SH PROCESSING PHASES
|
|
80
|
+
Apex exposes several phases in its pipeline.
|
|
81
|
+
Plugins can hook into one or more phases:
|
|
82
|
+
.IP \(bu 2
|
|
83
|
+
\f[B]\f[CB]pre_parse\f[B]\f[R]
|
|
84
|
+
.RS 2
|
|
85
|
+
.IP \(bu 2
|
|
86
|
+
Runs on the raw Markdown text before it is parsed.
|
|
87
|
+
.IP \(bu 2
|
|
88
|
+
Good for: custom syntax (e.g.\ \f[CR]{% kbd ... %}\f[R]), textual
|
|
89
|
+
rewrites, adding/removing markup before Apex sees it
|
|
90
|
+
.RE
|
|
91
|
+
.IP \(bu 2
|
|
92
|
+
\f[B]\f[CB]post_render\f[B]\f[R]
|
|
93
|
+
.RS 2
|
|
94
|
+
.IP \(bu 2
|
|
95
|
+
Runs on the final HTML output after Apex finishes rendering.
|
|
96
|
+
.IP \(bu 2
|
|
97
|
+
Good for: wrapping elements in spans/divs, adding CSS classes, simple
|
|
98
|
+
HTML post\-processing (e.g.\ turning \f[CR]:emoji:\f[R] into
|
|
99
|
+
\f[CR]<span>\f[R])
|
|
100
|
+
.RE
|
|
101
|
+
.PP
|
|
102
|
+
Internally, plugins for each phase are run in a deterministic order:
|
|
103
|
+
.IP "1." 3
|
|
104
|
+
Sorted by priority (lower numbers first; default is \f[CR]100\f[R]).
|
|
105
|
+
.IP "2." 3
|
|
106
|
+
Ties broken by plugin \f[CR]id\f[R] (lexicographically).
|
|
107
|
+
.SH PLUGIN MANIFEST
|
|
108
|
+
Each plugin is defined by a manifest file:
|
|
109
|
+
.IP \(bu 2
|
|
110
|
+
\f[B]File name\f[R]: \f[CR]plugin.yml\f[R]
|
|
111
|
+
.IP \(bu 2
|
|
112
|
+
\f[B]Location\f[R]: inside the plugin\(cqs directory
|
|
113
|
+
.PP
|
|
114
|
+
At minimum, a plugin needs:
|
|
115
|
+
.IP
|
|
116
|
+
.EX
|
|
117
|
+
\-\-\-
|
|
118
|
+
id\f[B]:\f[R] my\-plugin
|
|
119
|
+
phase\f[B]:\f[R] pre_parse\f[I] # or post_render\f[R]
|
|
120
|
+
priority\f[B]:\f[R] 100\f[I] # optional, lower runs earlier\f[R]
|
|
121
|
+
\-\-\-
|
|
122
|
+
.EE
|
|
123
|
+
.PP
|
|
124
|
+
From there, you choose one of two plugin types:
|
|
125
|
+
.IP \(bu 2
|
|
126
|
+
\f[B]External handler plugin\f[R] \- Runs an external command (Ruby,
|
|
127
|
+
Python, shell, etc.).
|
|
128
|
+
Declared with a \f[CR]handler.command\f[R] field.
|
|
129
|
+
.IP \(bu 2
|
|
130
|
+
\f[B]Declarative regex plugin\f[R] \- No external code; in\-process
|
|
131
|
+
regex search/replace.
|
|
132
|
+
Declared with \f[CR]pattern\f[R] and \f[CR]replacement\f[R] fields.
|
|
133
|
+
.PP
|
|
134
|
+
You can\(cqt mix both styles in a single plugin; if
|
|
135
|
+
\f[CR]handler.command\f[R] is present, the plugin is treated as
|
|
136
|
+
external.
|
|
137
|
+
.SS Metadata fields
|
|
138
|
+
To support plugin directories, automatic installation, and future
|
|
139
|
+
auto\-update tools, Apex understands several optional metadata fields in
|
|
140
|
+
\f[CR]plugin.yml\f[R]:
|
|
141
|
+
.IP \(bu 2
|
|
142
|
+
\f[B]\f[CB]title\f[B]\f[R]: Short, human\-friendly name for the plugin
|
|
143
|
+
.IP \(bu 2
|
|
144
|
+
\f[B]\f[CB]author\f[B]\f[R]: Free\-form author string
|
|
145
|
+
.IP \(bu 2
|
|
146
|
+
\f[B]\f[CB]description\f[B]\f[R]: One\-two sentence description of what
|
|
147
|
+
the plugin does
|
|
148
|
+
.IP \(bu 2
|
|
149
|
+
\f[B]\f[CB]homepage\f[B]\f[R]: Informational URL where users can learn
|
|
150
|
+
more about the plugin
|
|
151
|
+
.IP \(bu 2
|
|
152
|
+
\f[B]\f[CB]repo\f[B]\f[R]: Canonical Git URL for the plugin repository,
|
|
153
|
+
used by Apex when installing plugins
|
|
154
|
+
.IP \(bu 2
|
|
155
|
+
\f[B]\f[CB]post_install\f[B]\f[R]: Optional command that Apex will run
|
|
156
|
+
after cloning the plugin during \f[CR]\-\-install\-plugin\f[R]
|
|
157
|
+
.PP
|
|
158
|
+
Only \f[CR]id\f[R], \f[CR]phase\f[R], and either
|
|
159
|
+
\f[CR]handler.command\f[R] (for external plugins) or
|
|
160
|
+
\f[CR]pattern\f[R]/\f[CR]replacement\f[R] (for declarative plugins) are
|
|
161
|
+
required for execution.
|
|
162
|
+
.SH EXTERNAL HANDLER PLUGINS
|
|
163
|
+
An external handler plugin defines a command to run, which receives JSON
|
|
164
|
+
on stdin and writes the transformed text to stdout.
|
|
165
|
+
.SS Manifest example
|
|
166
|
+
.IP
|
|
167
|
+
.EX
|
|
168
|
+
\-\-\-
|
|
169
|
+
id\f[B]:\f[R] kbd
|
|
170
|
+
title\f[B]:\f[R] Keyboard Shortcuts
|
|
171
|
+
author\f[B]:\f[R] Brett Terpstra
|
|
172
|
+
description\f[B]:\f[R] Render {% kbd ... %} key combos to HTML
|
|
173
|
+
homepage\f[B]:\f[R] https://github.com/ApexMarkdown/apex\-kbd\-plugin
|
|
174
|
+
repo\f[B]:\f[R] https://github.com/ApexMarkdown/apex\-kbd\-plugin.git
|
|
175
|
+
phase\f[B]:\f[R] pre_parse
|
|
176
|
+
priority\f[B]:\f[R] 100
|
|
177
|
+
timeout_ms\f[B]:\f[R] 0\f[I] # optional\f[R]
|
|
178
|
+
handler\f[B]:\f[R]
|
|
179
|
+
command\f[B]:\f[R] \(dqruby kbd_plugin.rb\(dq
|
|
180
|
+
\-\-\-
|
|
181
|
+
.EE
|
|
182
|
+
.SS JSON protocol
|
|
183
|
+
For text phases (\f[CR]pre_parse\f[R], \f[CR]post_render\f[R]), Apex
|
|
184
|
+
sends your command a JSON object on stdin:
|
|
185
|
+
.IP
|
|
186
|
+
.EX
|
|
187
|
+
{
|
|
188
|
+
\(dqversion\(dq: 1,
|
|
189
|
+
\(dqplugin_id\(dq: \(dqkbd\(dq,
|
|
190
|
+
\(dqphase\(dq: \(dqpre_parse\(dq,
|
|
191
|
+
\(dqtext\(dq: \(dqraw or rendered text here\(dq
|
|
192
|
+
}
|
|
193
|
+
.EE
|
|
194
|
+
.PP
|
|
195
|
+
Your plugin should:
|
|
196
|
+
.IP "1." 3
|
|
197
|
+
Read all of stdin.
|
|
198
|
+
.IP "2." 3
|
|
199
|
+
Parse the JSON.
|
|
200
|
+
.IP "3." 3
|
|
201
|
+
Transform the \f[CR]text\f[R] field.
|
|
202
|
+
.IP "4." 3
|
|
203
|
+
Print the new text only to stdout (no extra JSON, headers, or logging).
|
|
204
|
+
.PP
|
|
205
|
+
If your plugin fails, times out, or prints nothing, Apex will treat it
|
|
206
|
+
as a no\-op and continue gracefully.
|
|
207
|
+
.SH DECLARATIVE REGEX PLUGINS
|
|
208
|
+
For many cases, you don\(cqt need a script at all.
|
|
209
|
+
A declarative regex plugin uses \f[CR]regex.h\f[R] inside Apex for fast
|
|
210
|
+
in\-process search/replace.
|
|
211
|
+
.SS Manifest example
|
|
212
|
+
.IP
|
|
213
|
+
.EX
|
|
214
|
+
\-\-\-
|
|
215
|
+
id\f[B]:\f[R] emoji\-span
|
|
216
|
+
title\f[B]:\f[R] Emoji span wrapper
|
|
217
|
+
author\f[B]:\f[R] Brett Terpstra
|
|
218
|
+
description\f[B]:\f[R] Wrap :emoji: markers in a span for styling
|
|
219
|
+
homepage\f[B]:\f[R] https://github.com/ApexMarkdown/apex\-emoji\-plugin
|
|
220
|
+
repo\f[B]:\f[R] https://github.com/ApexMarkdown/apex\-emoji\-plugin.git
|
|
221
|
+
phase\f[B]:\f[R] post_render
|
|
222
|
+
pattern\f[B]:\f[R] \(dq(:[a\-zA\-Z0\-9_+\-]+:)\(dq
|
|
223
|
+
replacement\f[B]:\f[R] \(dq<span class=\(rs\(dqemoji\(rs\(dq>$1</span>\(dq
|
|
224
|
+
flags\f[B]:\f[R] \(dqi\(dq\f[I] # optional: e.g. i, m, s\f[R]
|
|
225
|
+
priority\f[B]:\f[R] 200
|
|
226
|
+
timeout_ms\f[B]:\f[R] 0
|
|
227
|
+
\-\-\-
|
|
228
|
+
.EE
|
|
229
|
+
.IP \(bu 2
|
|
230
|
+
\f[B]\f[CB]pattern\f[B]\f[R]: POSIX regular expression (compiled via
|
|
231
|
+
\f[CR]regcomp\f[R]).
|
|
232
|
+
.IP \(bu 2
|
|
233
|
+
\f[B]\f[CB]replacement\f[B]\f[R]: Replacement string with capture groups
|
|
234
|
+
like \f[CR]$1\f[R], \f[CR]$2\f[R], etc.
|
|
235
|
+
Runs repeatedly across the text until no more matches.
|
|
236
|
+
.IP \(bu 2
|
|
237
|
+
\f[B]\f[CB]flags\f[B]\f[R] (optional): Currently supports \f[CR]i\f[R]
|
|
238
|
+
(case\-insensitive), \f[CR]m\f[R] (multi\-line), \f[CR]s\f[R] (dot
|
|
239
|
+
matches newline).
|
|
240
|
+
.PP
|
|
241
|
+
This is ideal when you only need straightforward pattern substitution
|
|
242
|
+
and performance matters.
|
|
243
|
+
.SH PLUGIN BUNDLES
|
|
244
|
+
Sometimes it is convenient for a single repository to provide multiple
|
|
245
|
+
related plugins as a bundle.
|
|
246
|
+
Apex supports a bundle syntax in \f[CR]plugin.yml\f[R] when built with
|
|
247
|
+
full YAML (libyaml) support.
|
|
248
|
+
.SS Bundle structure
|
|
249
|
+
A bundle manifest has:
|
|
250
|
+
.IP \(bu 2
|
|
251
|
+
Top\-level metadata that applies to the bundle as a whole.
|
|
252
|
+
.IP \(bu 2
|
|
253
|
+
A \f[CR]bundle:\f[R] key whose value is a YAML sequence (array) of
|
|
254
|
+
per\-plugin configs.
|
|
255
|
+
.PP
|
|
256
|
+
Example:
|
|
257
|
+
.IP
|
|
258
|
+
.EX
|
|
259
|
+
\-\-\-
|
|
260
|
+
id\f[B]:\f[R] documentation
|
|
261
|
+
title\f[B]:\f[R] Documentation helpers
|
|
262
|
+
author\f[B]:\f[R] Brett Terpstra
|
|
263
|
+
description\f[B]:\f[R] A bundle of documentation\-related helpers
|
|
264
|
+
homepage\f[B]:\f[R] https://github.com/ApexMarkdown/apex\-plugin\-documentation
|
|
265
|
+
repo\f[B]:\f[R] https://github.com/ApexMarkdown/apex\-plugin\-documentation.git
|
|
266
|
+
|
|
267
|
+
bundle\f[B]:\f[R]
|
|
268
|
+
\f[B]\-\f[R] id\f[B]:\f[R] kbd
|
|
269
|
+
title\f[B]:\f[R] Keyboard Shortcuts
|
|
270
|
+
description\f[B]:\f[R] Render {% kbd ... %} key combos to HTML <kbd> elements
|
|
271
|
+
phase\f[B]:\f[R] pre_parse
|
|
272
|
+
priority\f[B]:\f[R] 100
|
|
273
|
+
handler\f[B]:\f[R]
|
|
274
|
+
command\f[B]:\f[R] \(dqruby kbd_plugin.rb\(dq
|
|
275
|
+
|
|
276
|
+
\f[B]\-\f[R] id\f[B]:\f[R] menubar
|
|
277
|
+
title\f[B]:\f[R] Menubar Paths
|
|
278
|
+
description\f[B]:\f[R] Render {% menubar File, Open %} to a styled menu path
|
|
279
|
+
phase\f[B]:\f[R] pre_parse
|
|
280
|
+
handler\f[B]:\f[R]
|
|
281
|
+
command\f[B]:\f[R] \(dqruby menubar_plugin.rb\(dq
|
|
282
|
+
\-\-\-
|
|
283
|
+
.EE
|
|
284
|
+
.PP
|
|
285
|
+
Apex will treat this as three distinct plugins: \f[CR]kbd\f[R],
|
|
286
|
+
\f[CR]menubar\f[R], and \f[CR]prefspane\f[R], all sourced from the same
|
|
287
|
+
repository and manifest.
|
|
288
|
+
.SH ENVIRONMENT VARIABLES
|
|
289
|
+
When Apex runs an external handler plugin, it sets:
|
|
290
|
+
.IP \(bu 2
|
|
291
|
+
\f[B]\f[CB]APEX_PLUGIN_DIR\f[B]\f[R]
|
|
292
|
+
.RS 2
|
|
293
|
+
.IP \(bu 2
|
|
294
|
+
Filesystem path to the plugin\(cqs directory (where
|
|
295
|
+
\f[CR]plugin.yml\f[R] lives).
|
|
296
|
+
.IP \(bu 2
|
|
297
|
+
Useful for loading sidecar files, templates, etc.
|
|
298
|
+
.RE
|
|
299
|
+
.IP \(bu 2
|
|
300
|
+
\f[B]\f[CB]APEX_SUPPORT_DIR\f[B]\f[R]
|
|
301
|
+
.RS 2
|
|
302
|
+
.IP \(bu 2
|
|
303
|
+
Base support directory: \f[CR]$XDG_CONFIG_HOME/apex/support/\f[R] or
|
|
304
|
+
\f[CR]\(ti/.config/apex/support/\f[R]
|
|
305
|
+
.IP \(bu 2
|
|
306
|
+
For each plugin, Apex creates: \f[CR]APEX_SUPPORT_DIR/<plugin\-id>/\f[R]
|
|
307
|
+
.IP \(bu 2
|
|
308
|
+
You can safely write caches, logs, or temporary files there.
|
|
309
|
+
.RE
|
|
310
|
+
.IP \(bu 2
|
|
311
|
+
\f[B]\f[CB]APEX_FILE_PATH\f[B]\f[R]
|
|
312
|
+
.RS 2
|
|
313
|
+
.IP \(bu 2
|
|
314
|
+
When Apex is invoked on a file, this is the original path that was
|
|
315
|
+
passed on the command line.
|
|
316
|
+
.IP \(bu 2
|
|
317
|
+
When Apex reads from stdin, \f[CR]APEX_FILE_PATH\f[R] is set to the
|
|
318
|
+
current \f[CR]base_directory\f[R] (if one was set) or an empty string.
|
|
319
|
+
.RE
|
|
320
|
+
.PP
|
|
321
|
+
All of these variables apply only during the external command\(cqs
|
|
322
|
+
execution and are restored afterward.
|
|
323
|
+
.SH INSTALLING PLUGINS
|
|
324
|
+
Apex can install plugins directly from a central directory or from Git
|
|
325
|
+
URLs.
|
|
326
|
+
.SS Listing available plugins
|
|
327
|
+
.IP
|
|
328
|
+
.EX
|
|
329
|
+
apex \-\-list\-plugins
|
|
330
|
+
.EE
|
|
331
|
+
.PP
|
|
332
|
+
This command fetches the plugin directory and prints a listing of
|
|
333
|
+
installed and available plugins.
|
|
334
|
+
.SS Installing a plugin
|
|
335
|
+
The \f[CR]\-\-install\-plugin\f[R] command accepts three types of
|
|
336
|
+
arguments:
|
|
337
|
+
.IP "1." 3
|
|
338
|
+
\f[B]Plugin ID from the directory\f[R] (recommended for curated
|
|
339
|
+
plugins):
|
|
340
|
+
.RS 4
|
|
341
|
+
.IP
|
|
342
|
+
.EX
|
|
343
|
+
apex \-\-install\-plugin kbd
|
|
344
|
+
.EE
|
|
345
|
+
.RE
|
|
346
|
+
.IP "2." 3
|
|
347
|
+
\f[B]Full Git URL\f[R] (for plugins not in the directory):
|
|
348
|
+
.RS 4
|
|
349
|
+
.IP
|
|
350
|
+
.EX
|
|
351
|
+
apex \-\-install\-plugin https://github.com/ttscoff/apex\-plugin\-kbd.git
|
|
352
|
+
.EE
|
|
353
|
+
.RE
|
|
354
|
+
.IP "3." 3
|
|
355
|
+
\f[B]GitHub shorthand\f[R] (\f[CR]user/repo\f[R] format):
|
|
356
|
+
.RS 4
|
|
357
|
+
.IP
|
|
358
|
+
.EX
|
|
359
|
+
apex \-\-install\-plugin ttscoff/apex\-plugin\-kbd
|
|
360
|
+
.EE
|
|
361
|
+
.RE
|
|
362
|
+
.PP
|
|
363
|
+
When installing from a direct Git URL or GitHub shorthand (i.e.,
|
|
364
|
+
anything outside the curated directory), Apex will prompt for
|
|
365
|
+
confirmation since plugins execute unverified code.
|
|
366
|
+
.SS Uninstalling a plugin
|
|
367
|
+
.IP
|
|
368
|
+
.EX
|
|
369
|
+
apex \-\-uninstall\-plugin kbd
|
|
370
|
+
.EE
|
|
371
|
+
.PP
|
|
372
|
+
The \f[CR]\-\-uninstall\-plugin\f[R] command verifies that the plugin
|
|
373
|
+
directory exists, prompts for confirmation, and removes the plugin\(cqs
|
|
374
|
+
directory.
|
|
375
|
+
Support data under \f[CR].../apex/support/<plugin\-id>/\f[R] is left
|
|
376
|
+
intact.
|
|
377
|
+
.PP
|
|
378
|
+
This command only works for plugins installed in the user plugin
|
|
379
|
+
directory.
|
|
380
|
+
Project\-local plugins (in \f[CR].apex/plugins/\f[R]) must be removed
|
|
381
|
+
manually.
|
|
382
|
+
.SH EXAMPLES
|
|
383
|
+
.SS Example: \f[CR]kbd\f[R] liquid tag plugin
|
|
384
|
+
This example shows how to support a liquid\-style
|
|
385
|
+
\f[CR]{% kbd ... %}\f[R] syntax, turning key combos into
|
|
386
|
+
\f[CR]<kbd>\f[R] markup.
|
|
387
|
+
.SS Directory layout
|
|
388
|
+
.IP
|
|
389
|
+
.EX
|
|
390
|
+
\&.apex/
|
|
391
|
+
plugins/
|
|
392
|
+
kbd/
|
|
393
|
+
plugin.yml
|
|
394
|
+
kbd_plugin.rb
|
|
395
|
+
.EE
|
|
396
|
+
.SS \f[CR]plugin.yml\f[R]
|
|
397
|
+
.IP
|
|
398
|
+
.EX
|
|
399
|
+
\-\-\-
|
|
400
|
+
id\f[B]:\f[R] kbd
|
|
401
|
+
title\f[B]:\f[R] Keyboard Shortcuts
|
|
402
|
+
author\f[B]:\f[R] Brett Terpstra
|
|
403
|
+
description\f[B]:\f[R] Render {% kbd ... %} key combos to HTML <kbd> elements
|
|
404
|
+
homepage\f[B]:\f[R] https://github.com/ApexMarkdown/apex\-kbd\-plugin
|
|
405
|
+
repo\f[B]:\f[R] https://github.com/ApexMarkdown/apex\-kbd\-plugin.git
|
|
406
|
+
phase\f[B]:\f[R] pre_parse
|
|
407
|
+
priority\f[B]:\f[R] 100
|
|
408
|
+
timeout_ms\f[B]:\f[R] 0
|
|
409
|
+
handler\f[B]:\f[R]
|
|
410
|
+
command\f[B]:\f[R] \(dqruby kbd_plugin.rb\(dq
|
|
411
|
+
\-\-\-
|
|
412
|
+
.EE
|
|
413
|
+
.PP
|
|
414
|
+
The Ruby script reads JSON from stdin, extracts \f[CR]text\f[R],
|
|
415
|
+
replaces each \f[CR]{% kbd ... %}\f[R] occurrence with properly
|
|
416
|
+
formatted \f[CR]<kbd>\f[R] HTML, and prints the full transformed text to
|
|
417
|
+
stdout.
|
|
418
|
+
.SS Example: \f[CR]:emoji:\f[R] span plugin (declarative)
|
|
419
|
+
This plugin turns \f[CR]:emoji:\f[R] tokens in the final HTML into
|
|
420
|
+
\f[CR]<span class=\(dqemoji\(dq>:emoji:</span>\f[R].
|
|
421
|
+
.SS \f[CR]plugin.yml\f[R]
|
|
422
|
+
.IP
|
|
423
|
+
.EX
|
|
424
|
+
\-\-\-
|
|
425
|
+
id\f[B]:\f[R] emoji\-span
|
|
426
|
+
title\f[B]:\f[R] Emoji span wrapper
|
|
427
|
+
author\f[B]:\f[R] Brett Terpstra
|
|
428
|
+
description\f[B]:\f[R] Wrap :emoji: markers in a span for styling
|
|
429
|
+
homepage\f[B]:\f[R] https://github.com/ApexMarkdown/apex\-emoji\-plugin
|
|
430
|
+
repo\f[B]:\f[R] https://github.com/ApexMarkdown/apex\-emoji\-plugin.git
|
|
431
|
+
phase\f[B]:\f[R] post_render
|
|
432
|
+
pattern\f[B]:\f[R] \(dq(:[a\-zA\-Z0\-9_+\-]+:)\(dq
|
|
433
|
+
replacement\f[B]:\f[R] \(dq<span class=\(rs\(dqemoji\(rs\(dq>$1</span>\(dq
|
|
434
|
+
flags\f[B]:\f[R] \(dqi\(dq
|
|
435
|
+
priority\f[B]:\f[R] 200
|
|
436
|
+
timeout_ms\f[B]:\f[R] 0
|
|
437
|
+
\-\-\-
|
|
438
|
+
.EE
|
|
439
|
+
.PP
|
|
440
|
+
Because this is a declarative plugin, no external command is run.
|
|
441
|
+
Apex compiles the regex and runs the replacements internally.
|
|
442
|
+
.SH SEE ALSO
|
|
443
|
+
\f[B]apex\f[R](1), \f[B]apex\-config\f[R](5)
|
|
444
|
+
.PP
|
|
445
|
+
For complete documentation, see the \c
|
|
446
|
+
.UR https://github.com/ttscoff/apex/wiki
|
|
447
|
+
Apex Wiki
|
|
448
|
+
.UE \c
|
|
449
|
+
\&.
|
|
450
|
+
.SH AUTHOR
|
|
451
|
+
Brett Terpstra
|
|
452
|
+
.SH COPYRIGHT
|
|
453
|
+
Copyright (c) 2025 Brett Terpstra.
|
|
454
|
+
Licensed under MIT License.
|
|
455
|
+
.SH AUTHORS
|
|
456
|
+
Brett Terpstra.
|