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,220 @@
|
|
|
1
|
+
# cmark-gfm Integration Plan
|
|
2
|
+
|
|
3
|
+
## Architecture Analysis
|
|
4
|
+
|
|
5
|
+
### cmark-gfm Structure
|
|
6
|
+
|
|
7
|
+
**Core Library** (`src/`):
|
|
8
|
+
|
|
9
|
+
- `parser.h/blocks.c/inlines.c` - Parsing Markdown to AST
|
|
10
|
+
- `node.c/node.h` - AST node structure and manipulation
|
|
11
|
+
- `render.c/render.h` - Rendering framework
|
|
12
|
+
- `html.c` - HTML rendering
|
|
13
|
+
- `commonmark.c` - CommonMark output
|
|
14
|
+
- `buffer.c/buffer.h` - Dynamic string buffer
|
|
15
|
+
- `utf8.c/utf8.h` - UTF-8 utilities
|
|
16
|
+
- `arena.c` - Memory arena allocator
|
|
17
|
+
|
|
18
|
+
**Extensions** (`extensions/`):
|
|
19
|
+
|
|
20
|
+
- `autolink.c` - Autolink URLs
|
|
21
|
+
- `strikethrough.c` - `~~strikethrough~~`
|
|
22
|
+
- `table.c` - GFM tables
|
|
23
|
+
- `tasklist.c` - `- [ ]` task lists
|
|
24
|
+
- `tagfilter.c` - HTML tag filtering
|
|
25
|
+
|
|
26
|
+
**Extension System**:
|
|
27
|
+
|
|
28
|
+
- `syntax_extension.c/h` - Extension registration
|
|
29
|
+
- `cmark-gfm-core-extensions.h` - Core extension API
|
|
30
|
+
- Each extension can:
|
|
31
|
+
- Match block/inline syntax
|
|
32
|
+
- Create custom nodes
|
|
33
|
+
- Render custom nodes
|
|
34
|
+
|
|
35
|
+
### Key APIs
|
|
36
|
+
|
|
37
|
+
```c
|
|
38
|
+
// Simple API
|
|
39
|
+
char *cmark_markdown_to_html(const char *text, size_t len, int options);
|
|
40
|
+
|
|
41
|
+
// Parser API
|
|
42
|
+
cmark_parser *cmark_parser_new(int options);
|
|
43
|
+
void cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len);
|
|
44
|
+
cmark_node *cmark_parser_finish(cmark_parser *parser);
|
|
45
|
+
void cmark_parser_free(cmark_parser *parser);
|
|
46
|
+
|
|
47
|
+
// Node API
|
|
48
|
+
cmark_node_type cmark_node_get_type(cmark_node *node);
|
|
49
|
+
cmark_node *cmark_node_first_child(cmark_node *node);
|
|
50
|
+
cmark_node *cmark_node_next(cmark_node *node);
|
|
51
|
+
|
|
52
|
+
// Rendering API
|
|
53
|
+
char *cmark_render_html(cmark_node *root, int options, cmark_llist *extensions);
|
|
54
|
+
char *cmark_render_commonmark(cmark_node *root, int options, int width);
|
|
55
|
+
|
|
56
|
+
// Extension API
|
|
57
|
+
void cmark_parser_attach_syntax_extension(cmark_parser *parser, cmark_syntax_extension *ext);
|
|
58
|
+
cmark_syntax_extension *cmark_find_syntax_extension(const char *name);
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Extension System Design
|
|
63
|
+
|
|
64
|
+
Extensions can:
|
|
65
|
+
|
|
66
|
+
1. Register pattern matchers for blocks/inlines
|
|
67
|
+
2. Create custom node types
|
|
68
|
+
3. Provide custom rendering
|
|
69
|
+
4. Hook into parsing at various stages
|
|
70
|
+
|
|
71
|
+
## Integration Strategy
|
|
72
|
+
|
|
73
|
+
### Phase 1: Vendor cmark-gfm
|
|
74
|
+
|
|
75
|
+
1. Keep cmark-gfm in `vendor/cmark-gfm/`
|
|
76
|
+
2. Build it as part of Apex's CMake
|
|
77
|
+
3. Link statically into libapex
|
|
78
|
+
|
|
79
|
+
### Phase 2: Wrapper Layer
|
|
80
|
+
|
|
81
|
+
Create an Apex → cmark bridge:
|
|
82
|
+
|
|
83
|
+
```c
|
|
84
|
+
// apex/src/cmark_bridge.c
|
|
85
|
+
#include "apex/apex.h"
|
|
86
|
+
#include "cmark-gfm.h"
|
|
87
|
+
#include "cmark-gfm-core-extensions.h"
|
|
88
|
+
|
|
89
|
+
apex_node *apex_parse_cmark(const char *markdown, size_t len, const apex_options *opts) {
|
|
90
|
+
// Create cmark parser
|
|
91
|
+
int cmark_opts = apex_to_cmark_options(opts);
|
|
92
|
+
cmark_parser *parser = cmark_parser_new(cmark_opts);
|
|
93
|
+
|
|
94
|
+
// Attach GFM extensions if enabled
|
|
95
|
+
if (opts->enable_tables) {
|
|
96
|
+
cmark_parser_attach_syntax_extension(parser,
|
|
97
|
+
cmark_find_syntax_extension("table"));
|
|
98
|
+
}
|
|
99
|
+
if (opts->enable_task_lists) {
|
|
100
|
+
cmark_parser_attach_syntax_extension(parser,
|
|
101
|
+
cmark_find_syntax_extension("tasklist"));
|
|
102
|
+
}
|
|
103
|
+
// ... more extensions
|
|
104
|
+
|
|
105
|
+
// Parse
|
|
106
|
+
cmark_parser_feed(parser, markdown, len);
|
|
107
|
+
cmark_node *cmark_root = cmark_parser_finish(parser);
|
|
108
|
+
|
|
109
|
+
// Convert cmark AST to Apex AST
|
|
110
|
+
apex_node *apex_root = convert_cmark_to_apex(cmark_root);
|
|
111
|
+
|
|
112
|
+
// Clean up
|
|
113
|
+
cmark_node_free(cmark_root);
|
|
114
|
+
cmark_parser_free(parser);
|
|
115
|
+
|
|
116
|
+
return apex_root;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Phase 3: Custom Extensions
|
|
122
|
+
|
|
123
|
+
Create Apex-specific extensions:
|
|
124
|
+
|
|
125
|
+
1. **Metadata Extension** (`apex_metadata_ext.c`)
|
|
126
|
+
- Parse YAML/MMD/Pandoc metadata
|
|
127
|
+
- Store in custom node type
|
|
128
|
+
|
|
129
|
+
2. **Definition List Extension** (`apex_deflist_ext.c`)
|
|
130
|
+
- Parse `:` definition syntax
|
|
131
|
+
- Create DL/DT/DD nodes
|
|
132
|
+
|
|
133
|
+
3. **Callout Extension** (`apex_callout_ext.c`)
|
|
134
|
+
- Parse `> [!NOTE]` syntax
|
|
135
|
+
- Create callout nodes with types
|
|
136
|
+
|
|
137
|
+
4. **Critic Markup Extension** (`apex_critic_ext.c`)
|
|
138
|
+
- Parse `{++addition++}` etc.
|
|
139
|
+
- Create critic markup nodes
|
|
140
|
+
|
|
141
|
+
5. **Math Extension** (`apex_math_ext.c`)
|
|
142
|
+
- Parse `$math$` and `$$math$$`
|
|
143
|
+
- Create math nodes
|
|
144
|
+
|
|
145
|
+
6. **Wiki Link Extension** (`apex_wikilink_ext.c`)
|
|
146
|
+
- Parse `[[link]]`
|
|
147
|
+
- Create wiki link nodes
|
|
148
|
+
|
|
149
|
+
7. **Marked Special Extension** (`apex_marked_ext.c`)
|
|
150
|
+
- Parse `<!--TOC-->`, `<!--BREAK-->`, etc.
|
|
151
|
+
- Handle file includes
|
|
152
|
+
|
|
153
|
+
### Phase 4: AST Conversion
|
|
154
|
+
|
|
155
|
+
Two options:
|
|
156
|
+
|
|
157
|
+
**Option A: Convert to Apex AST**
|
|
158
|
+
|
|
159
|
+
- cmark nodes → Apex nodes
|
|
160
|
+
- Pros: Full control, can extend freely
|
|
161
|
+
- Cons: Conversion overhead
|
|
162
|
+
|
|
163
|
+
**Option B: Use cmark AST directly**
|
|
164
|
+
|
|
165
|
+
- Wrap cmark_node as apex_node
|
|
166
|
+
- Pros: Zero-copy, faster
|
|
167
|
+
- Cons: Tied to cmark structure
|
|
168
|
+
|
|
169
|
+
Recommendation: **Option A initially**, can optimize to B
|
|
170
|
+
later.
|
|
171
|
+
|
|
172
|
+
### Phase 5: Rendering
|
|
173
|
+
|
|
174
|
+
```c
|
|
175
|
+
char *apex_render_html(apex_node *root, const apex_options *opts) {
|
|
176
|
+
// If using pure cmark features, use cmark renderer
|
|
177
|
+
if (no_custom_extensions_used(root)) {
|
|
178
|
+
cmark_node *cmark_root = convert_apex_to_cmark(root);
|
|
179
|
+
char *html = cmark_render_html(cmark_root, opts->cmark_options, extensions);
|
|
180
|
+
cmark_node_free(cmark_root);
|
|
181
|
+
return html;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Otherwise use Apex's renderer with custom node support
|
|
185
|
+
return apex_render_html_custom(root, opts);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Implementation Steps
|
|
191
|
+
|
|
192
|
+
1. ✅ **Clone cmark-gfm** - Done
|
|
193
|
+
2. **Study APIs** - In progress
|
|
194
|
+
3. **Integrate CMake** - Add cmark as subdirectory
|
|
195
|
+
4. **Create bridge layer** - Wrap cmark API
|
|
196
|
+
5. **Test basic integration** - CommonMark tests
|
|
197
|
+
6. **Add GFM extensions** - Tables, task lists, etc.
|
|
198
|
+
7. **Create custom extensions** - Metadata, callouts, etc.
|
|
199
|
+
8. **AST conversion** - Bidirectional cmark ↔ Apex
|
|
200
|
+
9. **Enhanced rendering** - Support custom nodes
|
|
201
|
+
|
|
202
|
+
## Benefits of This Approach
|
|
203
|
+
|
|
204
|
+
✅ **Immediate Results**: Full CommonMark + GFM support right
|
|
205
|
+
away
|
|
206
|
+
✅ **Battle-tested**: cmark is used by GitHub, proven quality
|
|
207
|
+
✅ **Extensible**: Can add Apex features incrementally
|
|
208
|
+
✅ **Maintainable**: cmark updates can be merged upstream
|
|
209
|
+
✅ **Fast**: C implementation, no performance penalty
|
|
210
|
+
|
|
211
|
+
## Timeline
|
|
212
|
+
|
|
213
|
+
- **Week 1**: CMake integration + bridge layer
|
|
214
|
+
- **Week 2**: Basic tests passing, GFM working
|
|
215
|
+
- **Week 3**: Custom extensions (metadata, def lists)
|
|
216
|
+
- **Week 4**: More extensions (callouts, critic, math)
|
|
217
|
+
- **Week 5**: Polish and testing
|
|
218
|
+
|
|
219
|
+
**Target**: Full MVP in 4-5 weeks
|
|
220
|
+
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
# Critic Markup in Apex
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Apex provides comprehensive support for [CriticMarkup](http://criticmarkup.com), a system for tracking changes and annotations in plain text.
|
|
6
|
+
|
|
7
|
+
## Syntax
|
|
8
|
+
|
|
9
|
+
CriticMarkup uses five markup patterns:
|
|
10
|
+
|
|
11
|
+
### 1. Addition `{++text++}`
|
|
12
|
+
Text that has been added to the document.
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
The document now includes {++this new section++}.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### 2. Deletion `{--text--}`
|
|
20
|
+
Text that has been removed from the document.
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
The {--old approach--} is no longer used.
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 3. Substitution `{~~old~>new~~}`
|
|
28
|
+
Text that has been replaced with new text.
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
The process {~~was inefficient~>is now optimized~~}.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 4. Highlight `{==text==}`
|
|
36
|
+
Text that should be highlighted for attention (annotation,
|
|
37
|
+
not a change).
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
{==This section is critical==} for understanding the concept.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 5. Comment `{>>text<<}`
|
|
45
|
+
Editorial comments or notes (annotation, not a change).
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
{>>TODO: Expand this section with more examples<<}
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Processing Modes
|
|
55
|
+
|
|
56
|
+
Apex offers three modes for processing Critic Markup:
|
|
57
|
+
|
|
58
|
+
### Markup Mode (Default)
|
|
59
|
+
|
|
60
|
+
Shows all changes with HTML tags for styling.
|
|
61
|
+
|
|
62
|
+
**Command**:
|
|
63
|
+
```bash
|
|
64
|
+
apex document.md
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Output**:
|
|
69
|
+
```html
|
|
70
|
+
<ins class="critic">addition</ins>
|
|
71
|
+
<del class="critic">deletion</del>
|
|
72
|
+
<del class="critic break">old</del><ins class="critic break">new</ins>
|
|
73
|
+
<mark class="critic">highlight</mark>
|
|
74
|
+
<span class="critic comment">comment</span>
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Use for**: Reviewing changes, showing tracked edits
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### Accept Mode
|
|
83
|
+
|
|
84
|
+
Applies all changes, outputs clean final text.
|
|
85
|
+
|
|
86
|
+
**Command**:
|
|
87
|
+
```bash
|
|
88
|
+
apex --accept document.md
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Behavior**:
|
|
93
|
+
|
|
94
|
+
- `{++addition++}` → addition
|
|
95
|
+
- `{--deletion--}` → (removed)
|
|
96
|
+
- `{~~old~>new~~}` → new
|
|
97
|
+
- `{==highlight==}` → highlight (plain text)
|
|
98
|
+
- `{>>comment<<}` → (removed)
|
|
99
|
+
|
|
100
|
+
**Output**: Clean text with all edits applied
|
|
101
|
+
|
|
102
|
+
**Use for**: Publishing final version, accepting all changes
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### Reject Mode
|
|
107
|
+
|
|
108
|
+
Reverts all changes, restores original text.
|
|
109
|
+
|
|
110
|
+
**Command**:
|
|
111
|
+
```bash
|
|
112
|
+
apex --reject document.md
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Behavior**:
|
|
117
|
+
|
|
118
|
+
- `{++addition++}` → (removed)
|
|
119
|
+
- `{--deletion--}` → deletion
|
|
120
|
+
- `{~~old~>new~~}` → old
|
|
121
|
+
- `{==highlight==}` → highlight (plain text)
|
|
122
|
+
- `{>>comment<<}` → (removed)
|
|
123
|
+
|
|
124
|
+
**Output**: Clean text with all edits rejected
|
|
125
|
+
|
|
126
|
+
**Use for**: Reverting to original, rejecting all changes
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Examples
|
|
131
|
+
|
|
132
|
+
### Source Document
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
# Document Draft
|
|
136
|
+
|
|
137
|
+
This paragraph has {++new content++} and {--old content--} that needs review.
|
|
138
|
+
|
|
139
|
+
The formula {~~E=mc^2~>E=mc²~~} has been corrected.
|
|
140
|
+
|
|
141
|
+
{==This section is important==} for understanding the concept.
|
|
142
|
+
|
|
143
|
+
{>>TODO: Expand this section<<}
|
|
144
|
+
|
|
145
|
+
Final text.
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Markup Mode Output
|
|
150
|
+
|
|
151
|
+
```html
|
|
152
|
+
<h1>Document Draft</h1>
|
|
153
|
+
|
|
154
|
+
<p>This paragraph has <ins class="critic">new content</ins> and
|
|
155
|
+
<del class="critic">old content</del> that needs review.</p>
|
|
156
|
+
|
|
157
|
+
<p>The formula <del class="critic break">E=mc^2</del>
|
|
158
|
+
<ins class="critic break">E=mc²</ins> has been corrected.</p>
|
|
159
|
+
|
|
160
|
+
<p><mark class="critic">This section is important</mark> for
|
|
161
|
+
understanding the concept.</p>
|
|
162
|
+
|
|
163
|
+
<p><span class="critic comment">TODO: Expand this section</span></p>
|
|
164
|
+
|
|
165
|
+
<p>Final text.</p>
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Accept Mode Output
|
|
170
|
+
|
|
171
|
+
```html
|
|
172
|
+
<h1>Document Draft</h1>
|
|
173
|
+
|
|
174
|
+
<p>This paragraph has new content and that needs review.</p>
|
|
175
|
+
|
|
176
|
+
<p>The formula E=mc² has been corrected.</p>
|
|
177
|
+
|
|
178
|
+
<p>This section is important for understanding the concept.</p>
|
|
179
|
+
|
|
180
|
+
<p>Final text.</p>
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Reject Mode Output
|
|
185
|
+
|
|
186
|
+
```html
|
|
187
|
+
<h1>Document Draft</h1>
|
|
188
|
+
|
|
189
|
+
<p>This paragraph has and old content that needs review.</p>
|
|
190
|
+
|
|
191
|
+
<p>The formula E=mc^2 has been corrected.</p>
|
|
192
|
+
|
|
193
|
+
<p>This section is important for understanding the concept.</p>
|
|
194
|
+
|
|
195
|
+
<p>Final text.</p>
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Default Styling
|
|
202
|
+
|
|
203
|
+
When using `--standalone` mode, Apex includes default CSS
|
|
204
|
+
for Critic Markup:
|
|
205
|
+
|
|
206
|
+
```css
|
|
207
|
+
ins {
|
|
208
|
+
background: #d4fcbc; /* Light green */
|
|
209
|
+
text-decoration: none;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
del {
|
|
213
|
+
background: #fbb6c2; /* Light red */
|
|
214
|
+
text-decoration: line-through;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
mark {
|
|
218
|
+
background: #fff3cd; /* Light yellow */
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.critic.comment {
|
|
222
|
+
background: #e7e7e7; /* Light gray */
|
|
223
|
+
color: #666;
|
|
224
|
+
font-style: italic;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
These styles make changes clearly visible in markup mode.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Highlights vs Changes
|
|
234
|
+
|
|
235
|
+
**Important distinction**:
|
|
236
|
+
|
|
237
|
+
### Content Changes (affected by accept/reject):
|
|
238
|
+
|
|
239
|
+
- `{++additions++}` - Accept: keep, Reject: remove
|
|
240
|
+
- `{--deletions--}` - Accept: remove, Reject: keep
|
|
241
|
+
- `{~~old~>new~~}` - Accept: new, Reject: old
|
|
242
|
+
|
|
243
|
+
### Annotations (NOT changes):
|
|
244
|
+
|
|
245
|
+
- `{==highlights==}` - Both modes: show text without markup
|
|
246
|
+
- `{>>comments<<}` - Both modes: remove entirely
|
|
247
|
+
|
|
248
|
+
This distinction ensures that highlights (marking important
|
|
249
|
+
content) and comments (editorial notes) don't affect the
|
|
250
|
+
final text in either accept or reject mode.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Workflow Examples
|
|
255
|
+
|
|
256
|
+
### Editorial Review Process
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
# 1. Author writes with Critic Markup
|
|
260
|
+
vim draft.md
|
|
261
|
+
|
|
262
|
+
# 2. Generate review version with visible changes
|
|
263
|
+
apex draft.md -o review.html
|
|
264
|
+
|
|
265
|
+
# 3. After approval, generate clean final version
|
|
266
|
+
apex --accept draft.md -o final.html
|
|
267
|
+
|
|
268
|
+
# 4. If changes rejected, revert to original
|
|
269
|
+
apex --reject draft.md -o original.html
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Collaboration
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
# Show changes for review
|
|
277
|
+
apex --standalone --title "Review" draft.md -o review.html
|
|
278
|
+
|
|
279
|
+
# Accept changes and publish
|
|
280
|
+
apex --accept --standalone --title "Published" draft.md -o published.html
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Side-by-Side Comparison
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
# Generate all three versions
|
|
288
|
+
apex draft.md -o markup.html
|
|
289
|
+
apex --accept draft.md -o accepted.html
|
|
290
|
+
apex --reject draft.md -o rejected.html
|
|
291
|
+
|
|
292
|
+
# Compare in browser
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Features
|
|
299
|
+
|
|
300
|
+
### Protected Contexts
|
|
301
|
+
|
|
302
|
+
Critic Markup is NOT processed inside:
|
|
303
|
+
|
|
304
|
+
- Code blocks (``` ```)
|
|
305
|
+
- Inline code (` `)
|
|
306
|
+
- HTML blocks
|
|
307
|
+
|
|
308
|
+
This ensures examples remain literal.
|
|
309
|
+
|
|
310
|
+
### Nested Markup
|
|
311
|
+
|
|
312
|
+
Critic Markup can contain Markdown:
|
|
313
|
+
|
|
314
|
+
```markdown
|
|
315
|
+
The {++**bold new text**++} is added.
|
|
316
|
+
Changes to {~~*old italic*~>**new bold**~~}.
|
|
317
|
+
{==Important with `code`==}
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
The Markdown inside is processed after Critic Markup is
|
|
322
|
+
converted.
|
|
323
|
+
|
|
324
|
+
### Multiple Edits
|
|
325
|
+
|
|
326
|
+
Multiple changes in the same paragraph work correctly:
|
|
327
|
+
|
|
328
|
+
```markdown
|
|
329
|
+
Text with {++addition++} and {--deletion--} and {~~old~>new~~} in one line.
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## API Usage
|
|
336
|
+
|
|
337
|
+
### C API
|
|
338
|
+
|
|
339
|
+
```c
|
|
340
|
+
#include <apex/apex.h>
|
|
341
|
+
|
|
342
|
+
apex_options opts = apex_options_default();
|
|
343
|
+
|
|
344
|
+
// Markup mode (default)
|
|
345
|
+
opts.critic_mode = 2; // CRITIC_MARKUP
|
|
346
|
+
char *markup = apex_markdown_to_html(text, len, &opts);
|
|
347
|
+
|
|
348
|
+
// Accept mode
|
|
349
|
+
opts.critic_mode = 0; // CRITIC_ACCEPT
|
|
350
|
+
char *accepted = apex_markdown_to_html(text, len, &opts);
|
|
351
|
+
|
|
352
|
+
// Reject mode
|
|
353
|
+
opts.critic_mode = 1; // CRITIC_REJECT
|
|
354
|
+
char *rejected = apex_markdown_to_html(text, len, &opts);
|
|
355
|
+
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Enum Values
|
|
359
|
+
|
|
360
|
+
```c
|
|
361
|
+
typedef enum {
|
|
362
|
+
CRITIC_ACCEPT = 0, /* Accept all changes */
|
|
363
|
+
CRITIC_REJECT = 1, /* Reject all changes */
|
|
364
|
+
CRITIC_MARKUP = 2 /* Show markup with classes */
|
|
365
|
+
} critic_mode_t;
|
|
366
|
+
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## Testing
|
|
372
|
+
|
|
373
|
+
Apex includes comprehensive tests for all three modes:
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
# Run test suite
|
|
377
|
+
./build/apex_test_runner
|
|
378
|
+
|
|
379
|
+
# Manual testing
|
|
380
|
+
echo "Test {++add++} and {--del--}" | apex --accept
|
|
381
|
+
echo "Test {++add++} and {--del--}" | apex --reject
|
|
382
|
+
echo "Test {++add++} and {--del--}" | apex
|
|
383
|
+
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## Best Practices
|
|
389
|
+
|
|
390
|
+
### For Authors
|
|
391
|
+
|
|
392
|
+
1. **Use additions for new content**: `{++text++}`
|
|
393
|
+
2. **Use deletions for removed content**: `{--text--}`
|
|
394
|
+
3. **Use substitutions for replacements**: `{~~old~>new~~}`
|
|
395
|
+
4. **Use highlights for emphasis**: `{==text==}`
|
|
396
|
+
5. **Use comments for notes**: `{>>note<<}`
|
|
397
|
+
|
|
398
|
+
### For Reviewers
|
|
399
|
+
|
|
400
|
+
1. **Review with markup mode**: See all changes clearly
|
|
401
|
+
|
|
402
|
+
**Test both modes**: Generate accepted and rejected versions
|
|
403
|
+
|
|
404
|
+
3. **Compare outputs**: Ensure changes are as intended
|
|
405
|
+
4. **Remove comments**: Use accept/reject to clean up
|
|
406
|
+
|
|
407
|
+
editorial notes
|
|
408
|
+
|
|
409
|
+
### For Publishers
|
|
410
|
+
|
|
411
|
+
1. **Use --accept for final**: Clean published version
|
|
412
|
+
2. **Keep markup version**: For future reference
|
|
413
|
+
3. **Archive rejected**: In case revert needed
|
|
414
|
+
4. **Combine with --standalone**: Complete publishable
|
|
415
|
+
|
|
416
|
+
documents
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## Integration
|
|
421
|
+
|
|
422
|
+
### With Standalone Mode
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
# Beautiful review document
|
|
426
|
+
apex -s --pretty --title "Review Draft" draft.md -o review.html
|
|
427
|
+
|
|
428
|
+
# Clean final version
|
|
429
|
+
apex --accept -s --title "Final Version" draft.md -o final.html
|
|
430
|
+
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### With Pretty-Print
|
|
434
|
+
|
|
435
|
+
```bash
|
|
436
|
+
# Readable markup for source viewing
|
|
437
|
+
apex --pretty draft.md > readable.html
|
|
438
|
+
|
|
439
|
+
# Clean accepted version, nicely formatted
|
|
440
|
+
apex --accept --pretty draft.md > accepted.html
|
|
441
|
+
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## Troubleshooting
|
|
447
|
+
|
|
448
|
+
**Markup not processed**:
|
|
449
|
+
|
|
450
|
+
- Ensure you're in unified mode or MMD/Kramdown mode
|
|
451
|
+
- CommonMark and GFM modes don't enable Critic Markup by
|
|
452
|
+
|
|
453
|
+
default
|
|
454
|
+
|
|
455
|
+
**Changes not applying with --accept**:
|
|
456
|
+
|
|
457
|
+
- Check syntax is correct (proper opening/closing markers)
|
|
458
|
+
- Ensure no spaces in markers: `{++` not `{ ++`
|
|
459
|
+
|
|
460
|
+
**Output has extra spaces**:
|
|
461
|
+
|
|
462
|
+
- Normal behavior when markup is removed
|
|
463
|
+
- Spaces before/after markup preserved
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
## Comparison with Other Tools
|
|
468
|
+
|
|
469
|
+
| Feature | Apex | MultiMarkdown | Marked 2 |
|
|
470
|
+
| ------------------ | ---- | ------------- | -------- |
|
|
471
|
+
| Markup mode | ✓ | ✓ | ✓ |
|
|
472
|
+
| Accept mode | ✓ | - | ✓ |
|
|
473
|
+
| Reject mode | ✓ | - | ✓ |
|
|
474
|
+
| Highlight handling | ✓ | ✓ | ✓ |
|
|
475
|
+
| Comment handling | ✓ | ✓ | ✓ |
|
|
476
|
+
| Nested Markdown | ✓ | ✓ | ✓ |
|
|
477
|
+
| CLI flags | ✓ | - | GUI |
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
## Resources
|
|
482
|
+
|
|
483
|
+
- **CriticMarkup Website**: http://criticmarkup.com
|
|
484
|
+
- **Specification**: http://criticmarkup.com/spec.php
|
|
485
|
+
- **Apex Documentation**: See `docs/USER_GUIDE.md`
|
|
486
|
+
- **Examples**: See `tests/` directory
|
|
487
|
+
|
|
488
|
+
---
|
|
489
|
+
|
|
490
|
+
## Summary
|
|
491
|
+
|
|
492
|
+
Apex provides complete CriticMarkup support with three
|
|
493
|
+
processing modes:
|
|
494
|
+
|
|
495
|
+
1. **Markup** - Visual review
|
|
496
|
+
2. **Accept** - Apply changes
|
|
497
|
+
3. **Reject** - Revert changes
|
|
498
|
+
|
|
499
|
+
Combined with Apex's output modes (standalone, pretty), you
|
|
500
|
+
get a powerful editorial workflow tool!
|
|
501
|
+
|