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,1094 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Large Test Document for Performance and Feature Testing
|
|
3
|
+
author: Apex Test Suite
|
|
4
|
+
date: 2025-01-15
|
|
5
|
+
version: 2.0
|
|
6
|
+
description: A comprehensive large-scale markdown document for testing parser performance and edge cases
|
|
7
|
+
keywords: test, benchmark, performance, markdown, apex
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Large Test Document
|
|
11
|
+
|
|
12
|
+
This is a **large-scale** markdown document designed to test the Apex markdown processor with extensive content, various markdown features, and realistic document structure. This document contains thousands of lines of content across multiple sections.
|
|
13
|
+
|
|
14
|
+
{{TOC:2-6}}
|
|
15
|
+
|
|
16
|
+
## Introduction
|
|
17
|
+
|
|
18
|
+
This document serves as a comprehensive test suite for the Apex markdown processor. It includes:
|
|
19
|
+
|
|
20
|
+
- Multiple levels of headings
|
|
21
|
+
- Extensive text content
|
|
22
|
+
- Code blocks in various languages
|
|
23
|
+
- Tables with different structures
|
|
24
|
+
- Lists (ordered, unordered, nested)
|
|
25
|
+
- Links and references
|
|
26
|
+
- Images and media
|
|
27
|
+
- Metadata and front matter
|
|
28
|
+
- Footnotes and citations
|
|
29
|
+
- Definition lists
|
|
30
|
+
- Blockquotes
|
|
31
|
+
- Horizontal rules
|
|
32
|
+
- And much more...
|
|
33
|
+
|
|
34
|
+
The purpose is to create a document large enough to test performance characteristics while exercising all major features of the markdown processor.
|
|
35
|
+
|
|
36
|
+
## Chapter 1: Text Formatting and Typography
|
|
37
|
+
|
|
38
|
+
### Basic Text Styles
|
|
39
|
+
|
|
40
|
+
This section demonstrates various text formatting options available in markdown:
|
|
41
|
+
|
|
42
|
+
- **Bold text** for emphasis
|
|
43
|
+
- *Italic text* for subtle emphasis
|
|
44
|
+
- ***Bold italic*** for strong emphasis
|
|
45
|
+
- ~~Strikethrough text~~ for deletions
|
|
46
|
+
- `Inline code` for technical terms
|
|
47
|
+
- ==Highlighted text== for important information
|
|
48
|
+
- {++Inserted text++} for additions
|
|
49
|
+
- {--Deleted text--} for removals
|
|
50
|
+
- ^{Superscript text} for mathematical expressions
|
|
51
|
+
- ~{Subscript text} for chemical formulas
|
|
52
|
+
|
|
53
|
+
### Typography Features
|
|
54
|
+
|
|
55
|
+
Smart typography automatically converts:
|
|
56
|
+
|
|
57
|
+
- Three dashes `---` into an em-dash —
|
|
58
|
+
- Two dashes `--` into an en-dash –
|
|
59
|
+
- Three dots `...` into an ellipsis …
|
|
60
|
+
- Straight quotes `"like this"` into smart quotes "like this"
|
|
61
|
+
- Single quotes `'like this'` into smart quotes 'like this'
|
|
62
|
+
- Guillemets `<< and >>` for French quotes « and »
|
|
63
|
+
|
|
64
|
+
### Special Characters
|
|
65
|
+
|
|
66
|
+
The document includes various special characters:
|
|
67
|
+
|
|
68
|
+
- Copyright symbol: ©
|
|
69
|
+
- Registered trademark: ®
|
|
70
|
+
- Trademark: ™
|
|
71
|
+
- Euro: €
|
|
72
|
+
- Pound: £
|
|
73
|
+
- Yen: ¥
|
|
74
|
+
- Section: §
|
|
75
|
+
- Paragraph: ¶
|
|
76
|
+
- Degree: °
|
|
77
|
+
- Plus-minus: ±
|
|
78
|
+
- Multiplication: ×
|
|
79
|
+
- Division: ÷
|
|
80
|
+
|
|
81
|
+
## Chapter 2: Lists and Hierarchies
|
|
82
|
+
|
|
83
|
+
### Unordered Lists
|
|
84
|
+
|
|
85
|
+
Unordered lists can be nested to multiple levels:
|
|
86
|
+
|
|
87
|
+
- First level item
|
|
88
|
+
- Second level item
|
|
89
|
+
- Third level item
|
|
90
|
+
- Fourth level item
|
|
91
|
+
- Fifth level item
|
|
92
|
+
- Another first level item
|
|
93
|
+
- Nested item with **bold text**
|
|
94
|
+
- Nested item with *italic text*
|
|
95
|
+
- Nested item with `code`
|
|
96
|
+
- Yet another first level item
|
|
97
|
+
|
|
98
|
+
### Ordered Lists
|
|
99
|
+
|
|
100
|
+
Ordered lists demonstrate numbering:
|
|
101
|
+
|
|
102
|
+
1. First item
|
|
103
|
+
2. Second item
|
|
104
|
+
1. Sub-item A
|
|
105
|
+
2. Sub-item B
|
|
106
|
+
1. Sub-sub-item i
|
|
107
|
+
2. Sub-sub-item ii
|
|
108
|
+
3. Third item
|
|
109
|
+
4. Fourth item
|
|
110
|
+
1. Another sub-item
|
|
111
|
+
2. Yet another sub-item
|
|
112
|
+
|
|
113
|
+
### Task Lists
|
|
114
|
+
|
|
115
|
+
Task lists show completion status:
|
|
116
|
+
|
|
117
|
+
- [x] Completed task one
|
|
118
|
+
- [x] Completed task two
|
|
119
|
+
- [ ] Pending task one
|
|
120
|
+
- [ ] Pending task two
|
|
121
|
+
- [x] Another completed task
|
|
122
|
+
- [ ] Future task
|
|
123
|
+
- [ ] Another future task
|
|
124
|
+
|
|
125
|
+
### Definition Lists
|
|
126
|
+
|
|
127
|
+
Definition lists provide term definitions:
|
|
128
|
+
|
|
129
|
+
Term 1
|
|
130
|
+
: This is the definition of term 1. It can span multiple lines and contain various markdown elements like **bold** and *italic* text.
|
|
131
|
+
|
|
132
|
+
Term 2
|
|
133
|
+
: Definition of term 2 with `inline code` and [links](https://example.com).
|
|
134
|
+
|
|
135
|
+
Term 3
|
|
136
|
+
: A longer definition that includes:
|
|
137
|
+
- Nested lists
|
|
138
|
+
- Multiple paragraphs
|
|
139
|
+
|
|
140
|
+
And even code blocks:
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
def example():
|
|
144
|
+
return "definition list code"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Chapter 3: Code Blocks and Syntax Highlighting
|
|
148
|
+
|
|
149
|
+
### Python Code Examples
|
|
150
|
+
|
|
151
|
+
```python
|
|
152
|
+
#!/usr/bin/env python3
|
|
153
|
+
"""
|
|
154
|
+
A comprehensive Python example demonstrating various language features.
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
import os
|
|
158
|
+
import sys
|
|
159
|
+
from typing import List, Dict, Optional
|
|
160
|
+
from dataclasses import dataclass
|
|
161
|
+
from pathlib import Path
|
|
162
|
+
|
|
163
|
+
@dataclass
|
|
164
|
+
class Document:
|
|
165
|
+
"""Represents a markdown document."""
|
|
166
|
+
title: str
|
|
167
|
+
content: str
|
|
168
|
+
metadata: Dict[str, str]
|
|
169
|
+
|
|
170
|
+
def render(self) -> str:
|
|
171
|
+
"""Render the document to HTML."""
|
|
172
|
+
return f"<h1>{self.title}</h1>\n{self.content}"
|
|
173
|
+
|
|
174
|
+
def process_files(directory: Path) -> List[Document]:
|
|
175
|
+
"""Process all markdown files in a directory."""
|
|
176
|
+
documents = []
|
|
177
|
+
for file_path in directory.glob("*.md"):
|
|
178
|
+
with open(file_path, 'r', encoding='utf-8') as f:
|
|
179
|
+
content = f.read()
|
|
180
|
+
doc = Document(
|
|
181
|
+
title=file_path.stem,
|
|
182
|
+
content=content,
|
|
183
|
+
metadata={}
|
|
184
|
+
)
|
|
185
|
+
documents.append(doc)
|
|
186
|
+
return documents
|
|
187
|
+
|
|
188
|
+
if __name__ == "__main__":
|
|
189
|
+
base_dir = Path(__file__).parent
|
|
190
|
+
docs = process_files(base_dir / "fixtures")
|
|
191
|
+
for doc in docs:
|
|
192
|
+
print(doc.render())
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### JavaScript Code Examples
|
|
196
|
+
|
|
197
|
+
```javascript
|
|
198
|
+
/**
|
|
199
|
+
* Comprehensive JavaScript example with modern ES6+ features
|
|
200
|
+
*/
|
|
201
|
+
|
|
202
|
+
class MarkdownProcessor {
|
|
203
|
+
constructor(options = {}) {
|
|
204
|
+
this.options = {
|
|
205
|
+
gfm: true,
|
|
206
|
+
tables: true,
|
|
207
|
+
breaks: false,
|
|
208
|
+
...options
|
|
209
|
+
};
|
|
210
|
+
this.ast = null;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
parse(markdown) {
|
|
214
|
+
const lines = markdown.split('\n');
|
|
215
|
+
const blocks = [];
|
|
216
|
+
let currentBlock = null;
|
|
217
|
+
|
|
218
|
+
for (const line of lines) {
|
|
219
|
+
if (this.isHeading(line)) {
|
|
220
|
+
if (currentBlock) blocks.push(currentBlock);
|
|
221
|
+
currentBlock = this.parseHeading(line);
|
|
222
|
+
} else if (this.isCodeBlock(line)) {
|
|
223
|
+
if (currentBlock) blocks.push(currentBlock);
|
|
224
|
+
currentBlock = this.parseCodeBlock(line);
|
|
225
|
+
} else {
|
|
226
|
+
if (currentBlock) {
|
|
227
|
+
currentBlock.content += '\n' + line;
|
|
228
|
+
} else {
|
|
229
|
+
currentBlock = { type: 'paragraph', content: line };
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (currentBlock) blocks.push(currentBlock);
|
|
235
|
+
this.ast = { type: 'document', children: blocks };
|
|
236
|
+
return this.ast;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
isHeading(line) {
|
|
240
|
+
return /^#{1,6}\s/.test(line);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
isCodeBlock(line) {
|
|
244
|
+
return /^```/.test(line);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
parseHeading(line) {
|
|
248
|
+
const match = line.match(/^(#{1,6})\s+(.+)$/);
|
|
249
|
+
return {
|
|
250
|
+
type: 'heading',
|
|
251
|
+
level: match[1].length,
|
|
252
|
+
content: match[2]
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
parseCodeBlock(line) {
|
|
257
|
+
const language = line.slice(3).trim();
|
|
258
|
+
return {
|
|
259
|
+
type: 'code',
|
|
260
|
+
language: language || null,
|
|
261
|
+
content: ''
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
render() {
|
|
266
|
+
if (!this.ast) throw new Error('No AST to render');
|
|
267
|
+
return this.ast.children.map(block => {
|
|
268
|
+
switch (block.type) {
|
|
269
|
+
case 'heading':
|
|
270
|
+
return `<h${block.level}>${block.content}</h${block.level}>`;
|
|
271
|
+
case 'code':
|
|
272
|
+
return `<pre><code>${this.escapeHtml(block.content)}</code></pre>`;
|
|
273
|
+
default:
|
|
274
|
+
return `<p>${block.content}</p>`;
|
|
275
|
+
}
|
|
276
|
+
}).join('\n');
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
escapeHtml(text) {
|
|
280
|
+
const map = {
|
|
281
|
+
'&': '&',
|
|
282
|
+
'<': '<',
|
|
283
|
+
'>': '>',
|
|
284
|
+
'"': '"',
|
|
285
|
+
"'": '''
|
|
286
|
+
};
|
|
287
|
+
return text.replace(/[&<>"']/g, m => map[m]);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Usage example
|
|
292
|
+
const processor = new MarkdownProcessor({ gfm: true });
|
|
293
|
+
const markdown = `# Hello World\n\nThis is a test.`;
|
|
294
|
+
const ast = processor.parse(markdown);
|
|
295
|
+
const html = processor.render();
|
|
296
|
+
console.log(html);
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### C Code Examples
|
|
300
|
+
|
|
301
|
+
```c
|
|
302
|
+
/*
|
|
303
|
+
* Comprehensive C example demonstrating various language features
|
|
304
|
+
*/
|
|
305
|
+
|
|
306
|
+
#include <stdio.h>
|
|
307
|
+
#include <stdlib.h>
|
|
308
|
+
#include <string.h>
|
|
309
|
+
#include <stdbool.h>
|
|
310
|
+
#include <ctype.h>
|
|
311
|
+
|
|
312
|
+
#define MAX_LINE_LENGTH 1024
|
|
313
|
+
#define MAX_BLOCKS 1000
|
|
314
|
+
|
|
315
|
+
typedef enum {
|
|
316
|
+
BLOCK_PARAGRAPH,
|
|
317
|
+
BLOCK_HEADING,
|
|
318
|
+
BLOCK_CODE,
|
|
319
|
+
BLOCK_LIST,
|
|
320
|
+
BLOCK_QUOTE
|
|
321
|
+
} BlockType;
|
|
322
|
+
|
|
323
|
+
typedef struct {
|
|
324
|
+
BlockType type;
|
|
325
|
+
int level;
|
|
326
|
+
char *content;
|
|
327
|
+
size_t content_len;
|
|
328
|
+
} Block;
|
|
329
|
+
|
|
330
|
+
typedef struct {
|
|
331
|
+
Block *blocks;
|
|
332
|
+
size_t count;
|
|
333
|
+
size_t capacity;
|
|
334
|
+
} Document;
|
|
335
|
+
|
|
336
|
+
Document* document_create(void) {
|
|
337
|
+
Document *doc = malloc(sizeof(Document));
|
|
338
|
+
if (!doc) return NULL;
|
|
339
|
+
|
|
340
|
+
doc->capacity = 100;
|
|
341
|
+
doc->count = 0;
|
|
342
|
+
doc->blocks = malloc(sizeof(Block) * doc->capacity);
|
|
343
|
+
if (!doc->blocks) {
|
|
344
|
+
free(doc);
|
|
345
|
+
return NULL;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return doc;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
void document_destroy(Document *doc) {
|
|
352
|
+
if (!doc) return;
|
|
353
|
+
|
|
354
|
+
for (size_t i = 0; i < doc->count; i++) {
|
|
355
|
+
free(doc->blocks[i].content);
|
|
356
|
+
}
|
|
357
|
+
free(doc->blocks);
|
|
358
|
+
free(doc);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
bool document_add_block(Document *doc, BlockType type, int level, const char *content) {
|
|
362
|
+
if (doc->count >= doc->capacity) {
|
|
363
|
+
size_t new_capacity = doc->capacity * 2;
|
|
364
|
+
Block *new_blocks = realloc(doc->blocks, sizeof(Block) * new_capacity);
|
|
365
|
+
if (!new_blocks) return false;
|
|
366
|
+
doc->blocks = new_blocks;
|
|
367
|
+
doc->capacity = new_capacity;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
Block *block = &doc->blocks[doc->count];
|
|
371
|
+
block->type = type;
|
|
372
|
+
block->level = level;
|
|
373
|
+
block->content_len = strlen(content);
|
|
374
|
+
block->content = malloc(block->content_len + 1);
|
|
375
|
+
if (!block->content) return false;
|
|
376
|
+
|
|
377
|
+
strcpy(block->content, content);
|
|
378
|
+
doc->count++;
|
|
379
|
+
return true;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
void document_print(const Document *doc) {
|
|
383
|
+
printf("Document with %zu blocks:\n\n", doc->count);
|
|
384
|
+
for (size_t i = 0; i < doc->count; i++) {
|
|
385
|
+
const Block *block = &doc->blocks[i];
|
|
386
|
+
printf("Block %zu: type=%d, level=%d\n", i, block->type, block->level);
|
|
387
|
+
printf("Content: %s\n\n", block->content);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
int main(int argc, char *argv[]) {
|
|
392
|
+
Document *doc = document_create();
|
|
393
|
+
if (!doc) {
|
|
394
|
+
fprintf(stderr, "Failed to create document\n");
|
|
395
|
+
return 1;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
document_add_block(doc, BLOCK_HEADING, 1, "Hello World");
|
|
399
|
+
document_add_block(doc, BLOCK_PARAGRAPH, 0, "This is a test paragraph.");
|
|
400
|
+
document_add_block(doc, BLOCK_CODE, 0, "int x = 42;");
|
|
401
|
+
|
|
402
|
+
document_print(doc);
|
|
403
|
+
document_destroy(doc);
|
|
404
|
+
|
|
405
|
+
return 0;
|
|
406
|
+
}
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Rust Code Examples
|
|
410
|
+
|
|
411
|
+
```rust
|
|
412
|
+
/// Comprehensive Rust example demonstrating various language features
|
|
413
|
+
|
|
414
|
+
use std::collections::HashMap;
|
|
415
|
+
use std::fs::File;
|
|
416
|
+
use std::io::{BufRead, BufReader, Result};
|
|
417
|
+
use std::path::Path;
|
|
418
|
+
|
|
419
|
+
#[derive(Debug, Clone, PartialEq)]
|
|
420
|
+
enum BlockType {
|
|
421
|
+
Paragraph,
|
|
422
|
+
Heading(u8),
|
|
423
|
+
Code(Option<String>),
|
|
424
|
+
List(Vec<String>),
|
|
425
|
+
Quote,
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
#[derive(Debug)]
|
|
429
|
+
struct Block {
|
|
430
|
+
block_type: BlockType,
|
|
431
|
+
content: String,
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
#[derive(Debug)]
|
|
435
|
+
struct Document {
|
|
436
|
+
blocks: Vec<Block>,
|
|
437
|
+
metadata: HashMap<String, String>,
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
impl Document {
|
|
441
|
+
fn new() -> Self {
|
|
442
|
+
Document {
|
|
443
|
+
blocks: Vec::new(),
|
|
444
|
+
metadata: HashMap::new(),
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
fn add_block(&mut self, block_type: BlockType, content: String) {
|
|
449
|
+
self.blocks.push(Block {
|
|
450
|
+
block_type,
|
|
451
|
+
content,
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
fn parse_file<P: AsRef<Path>>(path: P) -> Result<Self> {
|
|
456
|
+
let file = File::open(path)?;
|
|
457
|
+
let reader = BufReader::new(file);
|
|
458
|
+
let mut doc = Document::new();
|
|
459
|
+
let mut current_block: Option<(BlockType, Vec<String>)> = None;
|
|
460
|
+
|
|
461
|
+
for line in reader.lines() {
|
|
462
|
+
let line = line?;
|
|
463
|
+
|
|
464
|
+
if line.starts_with("#") {
|
|
465
|
+
if let Some((bt, content)) = current_block.take() {
|
|
466
|
+
doc.add_block(bt, content.join("\n"));
|
|
467
|
+
}
|
|
468
|
+
let level = line.chars().take_while(|&c| c == '#').count() as u8;
|
|
469
|
+
let content = line[level as usize..].trim().to_string();
|
|
470
|
+
doc.add_block(BlockType::Heading(level), content);
|
|
471
|
+
} else if line.starts_with("```") {
|
|
472
|
+
if let Some((bt, content)) = current_block.take() {
|
|
473
|
+
doc.add_block(bt, content.join("\n"));
|
|
474
|
+
}
|
|
475
|
+
let language = if line.len() > 3 {
|
|
476
|
+
Some(line[3..].trim().to_string())
|
|
477
|
+
} else {
|
|
478
|
+
None
|
|
479
|
+
};
|
|
480
|
+
current_block = Some((BlockType::Code(language), Vec::new()));
|
|
481
|
+
} else if !line.trim().is_empty() {
|
|
482
|
+
if let Some((_, ref mut content)) = current_block {
|
|
483
|
+
content.push(line);
|
|
484
|
+
} else {
|
|
485
|
+
current_block = Some((BlockType::Paragraph, vec![line]));
|
|
486
|
+
}
|
|
487
|
+
} else {
|
|
488
|
+
if let Some((bt, content)) = current_block.take() {
|
|
489
|
+
doc.add_block(bt, content.join("\n"));
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
if let Some((bt, content)) = current_block {
|
|
495
|
+
doc.add_block(bt, content.join("\n"));
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
Ok(doc)
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
fn render_html(&self) -> String {
|
|
502
|
+
let mut html = String::new();
|
|
503
|
+
for block in &self.blocks {
|
|
504
|
+
match block.block_type {
|
|
505
|
+
BlockType::Heading(level) => {
|
|
506
|
+
html.push_str(&format!("<h{}>{}</h{}>\n", level, block.content, level));
|
|
507
|
+
}
|
|
508
|
+
BlockType::Code(ref lang) => {
|
|
509
|
+
let lang_attr = lang.as_ref()
|
|
510
|
+
.map(|l| format!(" class=\"language-{}\"", l))
|
|
511
|
+
.unwrap_or_default();
|
|
512
|
+
html.push_str(&format!("<pre><code{}>{}</code></pre>\n", lang_attr, block.content));
|
|
513
|
+
}
|
|
514
|
+
BlockType::Paragraph => {
|
|
515
|
+
html.push_str(&format!("<p>{}</p>\n", block.content));
|
|
516
|
+
}
|
|
517
|
+
_ => {}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
html
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
fn main() -> Result<()> {
|
|
525
|
+
let doc = Document::parse_file("example.md")?;
|
|
526
|
+
println!("{}", doc.render_html());
|
|
527
|
+
Ok(())
|
|
528
|
+
}
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
### Go Code Examples
|
|
532
|
+
|
|
533
|
+
```go
|
|
534
|
+
package main
|
|
535
|
+
|
|
536
|
+
import (
|
|
537
|
+
"bufio"
|
|
538
|
+
"fmt"
|
|
539
|
+
"os"
|
|
540
|
+
"strings"
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
// BlockType represents the type of a markdown block
|
|
544
|
+
type BlockType int
|
|
545
|
+
|
|
546
|
+
const (
|
|
547
|
+
BlockParagraph BlockType = iota
|
|
548
|
+
BlockHeading
|
|
549
|
+
BlockCode
|
|
550
|
+
BlockList
|
|
551
|
+
BlockQuote
|
|
552
|
+
)
|
|
553
|
+
|
|
554
|
+
// Block represents a single markdown block
|
|
555
|
+
type Block struct {
|
|
556
|
+
Type BlockType
|
|
557
|
+
Level int
|
|
558
|
+
Content string
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// Document represents a complete markdown document
|
|
562
|
+
type Document struct {
|
|
563
|
+
Blocks []Block
|
|
564
|
+
Metadata map[string]string
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
// NewDocument creates a new empty document
|
|
568
|
+
func NewDocument() *Document {
|
|
569
|
+
return &Document{
|
|
570
|
+
Blocks: make([]Block, 0),
|
|
571
|
+
Metadata: make(map[string]string),
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// AddBlock adds a new block to the document
|
|
576
|
+
func (d *Document) AddBlock(blockType BlockType, level int, content string) {
|
|
577
|
+
d.Blocks = append(d.Blocks, Block{
|
|
578
|
+
Type: blockType,
|
|
579
|
+
Level: level,
|
|
580
|
+
Content: content,
|
|
581
|
+
})
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
// ParseFile parses a markdown file and returns a Document
|
|
585
|
+
func ParseFile(filename string) (*Document, error) {
|
|
586
|
+
file, err := os.Open(filename)
|
|
587
|
+
if err != nil {
|
|
588
|
+
return nil, err
|
|
589
|
+
}
|
|
590
|
+
defer file.Close()
|
|
591
|
+
|
|
592
|
+
doc := NewDocument()
|
|
593
|
+
scanner := bufio.NewScanner(file)
|
|
594
|
+
var currentBlock strings.Builder
|
|
595
|
+
var inCodeBlock bool
|
|
596
|
+
var codeLanguage string
|
|
597
|
+
|
|
598
|
+
for scanner.Scan() {
|
|
599
|
+
line := scanner.Text()
|
|
600
|
+
|
|
601
|
+
if strings.HasPrefix(line, "```") {
|
|
602
|
+
if inCodeBlock {
|
|
603
|
+
doc.AddBlock(BlockCode, 0, currentBlock.String())
|
|
604
|
+
currentBlock.Reset()
|
|
605
|
+
inCodeBlock = false
|
|
606
|
+
} else {
|
|
607
|
+
codeLanguage = strings.TrimSpace(line[3:])
|
|
608
|
+
inCodeBlock = true
|
|
609
|
+
}
|
|
610
|
+
continue
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
if inCodeBlock {
|
|
614
|
+
currentBlock.WriteString(line)
|
|
615
|
+
currentBlock.WriteString("\n")
|
|
616
|
+
continue
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
if strings.HasPrefix(line, "#") {
|
|
620
|
+
if currentBlock.Len() > 0 {
|
|
621
|
+
doc.AddBlock(BlockParagraph, 0, currentBlock.String())
|
|
622
|
+
currentBlock.Reset()
|
|
623
|
+
}
|
|
624
|
+
level := 0
|
|
625
|
+
for _, char := range line {
|
|
626
|
+
if char == '#' {
|
|
627
|
+
level++
|
|
628
|
+
} else {
|
|
629
|
+
break
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
content := strings.TrimSpace(line[level:])
|
|
633
|
+
doc.AddBlock(BlockHeading, level, content)
|
|
634
|
+
continue
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
if line == "" {
|
|
638
|
+
if currentBlock.Len() > 0 {
|
|
639
|
+
doc.AddBlock(BlockParagraph, 0, currentBlock.String())
|
|
640
|
+
currentBlock.Reset()
|
|
641
|
+
}
|
|
642
|
+
continue
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
if currentBlock.Len() > 0 {
|
|
646
|
+
currentBlock.WriteString(" ")
|
|
647
|
+
}
|
|
648
|
+
currentBlock.WriteString(line)
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
if currentBlock.Len() > 0 {
|
|
652
|
+
doc.AddBlock(BlockParagraph, 0, currentBlock.String())
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
return doc, scanner.Err()
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
// RenderHTML renders the document as HTML
|
|
659
|
+
func (d *Document) RenderHTML() string {
|
|
660
|
+
var html strings.Builder
|
|
661
|
+
for _, block := range d.Blocks {
|
|
662
|
+
switch block.Type {
|
|
663
|
+
case BlockHeading:
|
|
664
|
+
html.WriteString(fmt.Sprintf("<h%d>%s</h%d>\n", block.Level, block.Content, block.Level))
|
|
665
|
+
case BlockCode:
|
|
666
|
+
html.WriteString(fmt.Sprintf("<pre><code>%s</code></pre>\n", block.Content))
|
|
667
|
+
case BlockParagraph:
|
|
668
|
+
html.WriteString(fmt.Sprintf("<p>%s</p>\n", block.Content))
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
return html.String()
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
func main() {
|
|
675
|
+
if len(os.Args) < 2 {
|
|
676
|
+
fmt.Fprintf(os.Stderr, "Usage: %s <markdown-file>\n", os.Args[0])
|
|
677
|
+
os.Exit(1)
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
doc, err := ParseFile(os.Args[1])
|
|
681
|
+
if err != nil {
|
|
682
|
+
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
|
683
|
+
os.Exit(1)
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
fmt.Print(doc.RenderHTML())
|
|
687
|
+
}
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
## Chapter 4: Tables
|
|
691
|
+
|
|
692
|
+
### Simple Tables
|
|
693
|
+
|
|
694
|
+
| Column 1 | Column 2 | Column 3 |
|
|
695
|
+
|----------|----------|----------|
|
|
696
|
+
| Row 1, Col 1 | Row 1, Col 2 | Row 1, Col 3 |
|
|
697
|
+
| Row 2, Col 1 | Row 2, Col 2 | Row 2, Col 3 |
|
|
698
|
+
| Row 3, Col 1 | Row 3, Col 2 | Row 3, Col 3 |
|
|
699
|
+
|
|
700
|
+
### Tables with Alignment
|
|
701
|
+
|
|
702
|
+
| Left Aligned | Center Aligned | Right Aligned |
|
|
703
|
+
|:-------------|:--------------:|--------------:|
|
|
704
|
+
| Left text | Center text | Right text |
|
|
705
|
+
| More left | More center | More right |
|
|
706
|
+
| Even more left | Even more center | Even more right |
|
|
707
|
+
|
|
708
|
+
### Tables with Formatting
|
|
709
|
+
|
|
710
|
+
| Feature | Status | Notes |
|
|
711
|
+
|---------|--------|-------|
|
|
712
|
+
| **Bold text** | ✅ Complete | Works well |
|
|
713
|
+
| *Italic text* | ✅ Complete | Works well |
|
|
714
|
+
| `Code spans` | ✅ Complete | Works well |
|
|
715
|
+
| [Links](https://example.com) | ✅ Complete | Works well |
|
|
716
|
+
| Images | 🚧 In Progress | Needs testing |
|
|
717
|
+
| Tables | ✅ Complete | Works well |
|
|
718
|
+
|
|
719
|
+
### Large Tables
|
|
720
|
+
|
|
721
|
+
| ID | Name | Email | Department | Salary | Start Date | Status |
|
|
722
|
+
|----|------|-------|------------|--------|------------|--------|
|
|
723
|
+
| 1 | John Doe | john@example.com | Engineering | $100,000 | 2020-01-15 | Active |
|
|
724
|
+
| 2 | Jane Smith | jane@example.com | Marketing | $85,000 | 2019-06-20 | Active |
|
|
725
|
+
| 3 | Bob Johnson | bob@example.com | Sales | $75,000 | 2021-03-10 | Active |
|
|
726
|
+
| 4 | Alice Williams | alice@example.com | Engineering | $110,000 | 2018-09-05 | Active |
|
|
727
|
+
| 5 | Charlie Brown | charlie@example.com | HR | $70,000 | 2022-01-10 | Active |
|
|
728
|
+
| 6 | Diana Prince | diana@example.com | Engineering | $120,000 | 2017-11-12 | Active |
|
|
729
|
+
| 7 | Edward Norton | edward@example.com | Marketing | $80,000 | 2020-08-22 | Active |
|
|
730
|
+
| 8 | Fiona Apple | fiona@example.com | Sales | $78,000 | 2021-05-18 | Active |
|
|
731
|
+
| 9 | George Lucas | george@example.com | Engineering | $115,000 | 2019-02-14 | Active |
|
|
732
|
+
| 10 | Helen Troy | helen@example.com | HR | $72,000 | 2022-07-30 | Active |
|
|
733
|
+
|
|
734
|
+
## Chapter 5: Links and References
|
|
735
|
+
|
|
736
|
+
### Standard Links
|
|
737
|
+
|
|
738
|
+
Here are various types of links:
|
|
739
|
+
|
|
740
|
+
- [Standard link](https://example.com)
|
|
741
|
+
- [Link with title](https://example.com "Example Website")
|
|
742
|
+
- [Relative link](../docs/readme.md)
|
|
743
|
+
- [Anchor link](#chapter-5-links-and-references)
|
|
744
|
+
- [Email link](mailto:test@example.com)
|
|
745
|
+
- [Phone link](tel:+1-555-123-4567)
|
|
746
|
+
|
|
747
|
+
### Autolinks
|
|
748
|
+
|
|
749
|
+
Automatic link detection:
|
|
750
|
+
|
|
751
|
+
- https://github.com/apex/markdown
|
|
752
|
+
- http://example.com
|
|
753
|
+
- www.example.com
|
|
754
|
+
- test@example.com
|
|
755
|
+
|
|
756
|
+
### Reference-Style Links
|
|
757
|
+
|
|
758
|
+
Reference-style links[^ref1] are useful for keeping the document clean[^ref2].
|
|
759
|
+
|
|
760
|
+
[^ref1]: https://example.com/reference1
|
|
761
|
+
[^ref2]: https://example.com/reference2
|
|
762
|
+
|
|
763
|
+
### Wiki Links
|
|
764
|
+
|
|
765
|
+
Wiki-style links for internal navigation:
|
|
766
|
+
|
|
767
|
+
- [[Home]]
|
|
768
|
+
- [[Documentation]]
|
|
769
|
+
- [[API Reference]]
|
|
770
|
+
- [[Getting Started|Start Here]]
|
|
771
|
+
- [[API#Methods]]
|
|
772
|
+
- [[Documentation#Installation]]
|
|
773
|
+
|
|
774
|
+
### Footnotes
|
|
775
|
+
|
|
776
|
+
Here's a simple footnote[^1] and another one[^2]. We also support inline footnotes^[This is an inline footnote with some **bold** and *italic* text] and MMD inline footnotes[^This is an MMD style inline footnote with spaces and formatting].
|
|
777
|
+
|
|
778
|
+
[^1]: This is the first footnote with **formatted** content and `code`.
|
|
779
|
+
|
|
780
|
+
[^2]: This footnote has multiple paragraphs.
|
|
781
|
+
|
|
782
|
+
It can contain code blocks:
|
|
783
|
+
|
|
784
|
+
```python
|
|
785
|
+
def footnote_example():
|
|
786
|
+
return "footnote code"
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
And other block-level content!
|
|
790
|
+
|
|
791
|
+
[^3]: Footnotes can reference other footnotes[^1] and include [links](https://example.com).
|
|
792
|
+
|
|
793
|
+
## Chapter 6: Images and Media
|
|
794
|
+
|
|
795
|
+
### Basic Images
|
|
796
|
+
|
|
797
|
+

|
|
798
|
+
|
|
799
|
+

|
|
800
|
+
|
|
801
|
+
### Images with Attributes
|
|
802
|
+
|
|
803
|
+
{width=500}
|
|
804
|
+
|
|
805
|
+
{height=300}
|
|
806
|
+
|
|
807
|
+
{width=500 height=300}
|
|
808
|
+
|
|
809
|
+
### Image References
|
|
810
|
+
|
|
811
|
+
![Reference image][ref-img]
|
|
812
|
+
|
|
813
|
+
[ref-img]: https://example.com/reference.png "Reference image title"
|
|
814
|
+
|
|
815
|
+
## Chapter 7: Blockquotes
|
|
816
|
+
|
|
817
|
+
### Simple Blockquotes
|
|
818
|
+
|
|
819
|
+
> This is a simple blockquote. It can contain multiple lines of text and will be rendered as a quote block.
|
|
820
|
+
|
|
821
|
+
> This is another blockquote with **bold text** and *italic text*.
|
|
822
|
+
|
|
823
|
+
### Nested Blockquotes
|
|
824
|
+
|
|
825
|
+
> This is the outer blockquote.
|
|
826
|
+
>
|
|
827
|
+
> > This is a nested blockquote.
|
|
828
|
+
> >
|
|
829
|
+
> > > And this is even more nested.
|
|
830
|
+
|
|
831
|
+
### Blockquotes with Other Elements
|
|
832
|
+
|
|
833
|
+
> This blockquote contains:
|
|
834
|
+
>
|
|
835
|
+
> - A list item
|
|
836
|
+
> - Another list item
|
|
837
|
+
>
|
|
838
|
+
> And a code block:
|
|
839
|
+
>
|
|
840
|
+
> ```python
|
|
841
|
+
> def example():
|
|
842
|
+
> return "blockquote code"
|
|
843
|
+
> ```
|
|
844
|
+
>
|
|
845
|
+
> And even a [link](https://example.com).
|
|
846
|
+
|
|
847
|
+
## Chapter 8: Horizontal Rules
|
|
848
|
+
|
|
849
|
+
Horizontal rules can be created in multiple ways:
|
|
850
|
+
|
|
851
|
+
---
|
|
852
|
+
|
|
853
|
+
***
|
|
854
|
+
|
|
855
|
+
___
|
|
856
|
+
|
|
857
|
+
- - -
|
|
858
|
+
|
|
859
|
+
* * *
|
|
860
|
+
|
|
861
|
+
## Chapter 9: Extended Content Sections
|
|
862
|
+
|
|
863
|
+
### Section 9.1: Detailed Explanations
|
|
864
|
+
|
|
865
|
+
This section contains extensive text content to test the parser's handling of long paragraphs and multiple sections. The content is designed to be realistic and representative of actual documentation or articles.
|
|
866
|
+
|
|
867
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
868
|
+
|
|
869
|
+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
|
|
870
|
+
|
|
871
|
+
### Section 9.2: Technical Details
|
|
872
|
+
|
|
873
|
+
When processing markdown documents, the parser must handle various edge cases and special situations. This includes:
|
|
874
|
+
|
|
875
|
+
1. **Nested structures**: Lists within lists, blockquotes within blockquotes, code blocks within other blocks
|
|
876
|
+
2. **Edge cases**: Empty lines, whitespace handling, special characters
|
|
877
|
+
3. **Performance**: Large documents, many nested elements, extensive content
|
|
878
|
+
4. **Compatibility**: Different markdown flavors, extensions, and custom syntax
|
|
879
|
+
|
|
880
|
+
The parser should maintain good performance even with very large documents containing thousands of lines and hundreds of elements.
|
|
881
|
+
|
|
882
|
+
### Section 9.3: Real-World Scenarios
|
|
883
|
+
|
|
884
|
+
In real-world usage, markdown documents can vary significantly in size and complexity. Some documents are simple and straightforward, while others contain:
|
|
885
|
+
|
|
886
|
+
- Extensive code examples
|
|
887
|
+
- Multiple levels of nesting
|
|
888
|
+
- Complex table structures
|
|
889
|
+
- Many cross-references and links
|
|
890
|
+
- Embedded media and images
|
|
891
|
+
- Custom extensions and syntax
|
|
892
|
+
|
|
893
|
+
This test document attempts to capture many of these scenarios to ensure the parser handles them correctly.
|
|
894
|
+
|
|
895
|
+
## Chapter 10: Advanced Features
|
|
896
|
+
|
|
897
|
+
### Callouts and Admonitions
|
|
898
|
+
|
|
899
|
+
> [!NOTE]
|
|
900
|
+
> This is a note callout with important information.
|
|
901
|
+
|
|
902
|
+
> [!TIP]
|
|
903
|
+
> This is a tip callout with helpful advice.
|
|
904
|
+
|
|
905
|
+
> [!WARNING]
|
|
906
|
+
> This is a warning callout with cautionary information.
|
|
907
|
+
|
|
908
|
+
> [!IMPORTANT]
|
|
909
|
+
> This is an important callout with critical information.
|
|
910
|
+
|
|
911
|
+
### Inline Attribute Lists
|
|
912
|
+
|
|
913
|
+
This is a paragraph with an inline attribute list{.class-name #id-name}.
|
|
914
|
+
|
|
915
|
+
This is another paragraph with attributes{style="color: red;"}.
|
|
916
|
+
|
|
917
|
+
### Math Expressions
|
|
918
|
+
|
|
919
|
+
Inline math: $E = mc^2$
|
|
920
|
+
|
|
921
|
+
Block math:
|
|
922
|
+
|
|
923
|
+
$$
|
|
924
|
+
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
|
|
925
|
+
$$
|
|
926
|
+
|
|
927
|
+
### Citations
|
|
928
|
+
|
|
929
|
+
This document references various sources[@smith2020; @jones2021; @brown2022].
|
|
930
|
+
|
|
931
|
+
## Chapter 11: Performance Test Content
|
|
932
|
+
|
|
933
|
+
This chapter contains repetitive content designed to test parser performance with large amounts of similar content.
|
|
934
|
+
|
|
935
|
+
### Section 11.1: Repeated Patterns
|
|
936
|
+
|
|
937
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
938
|
+
|
|
939
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
940
|
+
|
|
941
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
942
|
+
|
|
943
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
944
|
+
|
|
945
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
946
|
+
|
|
947
|
+
### Section 11.2: Many Lists
|
|
948
|
+
|
|
949
|
+
- Item 1
|
|
950
|
+
- Item 2
|
|
951
|
+
- Item 3
|
|
952
|
+
- Item 4
|
|
953
|
+
- Item 5
|
|
954
|
+
- Item 6
|
|
955
|
+
- Item 7
|
|
956
|
+
- Item 8
|
|
957
|
+
- Item 9
|
|
958
|
+
- Item 10
|
|
959
|
+
- Item 11
|
|
960
|
+
- Item 12
|
|
961
|
+
- Item 13
|
|
962
|
+
- Item 14
|
|
963
|
+
- Item 15
|
|
964
|
+
- Item 16
|
|
965
|
+
- Item 17
|
|
966
|
+
- Item 18
|
|
967
|
+
- Item 19
|
|
968
|
+
- Item 20
|
|
969
|
+
|
|
970
|
+
1. Numbered item 1
|
|
971
|
+
2. Numbered item 2
|
|
972
|
+
3. Numbered item 3
|
|
973
|
+
4. Numbered item 4
|
|
974
|
+
5. Numbered item 5
|
|
975
|
+
6. Numbered item 6
|
|
976
|
+
7. Numbered item 7
|
|
977
|
+
8. Numbered item 8
|
|
978
|
+
9. Numbered item 9
|
|
979
|
+
10. Numbered item 10
|
|
980
|
+
11. Numbered item 11
|
|
981
|
+
12. Numbered item 12
|
|
982
|
+
13. Numbered item 13
|
|
983
|
+
14. Numbered item 14
|
|
984
|
+
15. Numbered item 15
|
|
985
|
+
16. Numbered item 16
|
|
986
|
+
17. Numbered item 17
|
|
987
|
+
18. Numbered item 18
|
|
988
|
+
19. Numbered item 19
|
|
989
|
+
20. Numbered item 20
|
|
990
|
+
|
|
991
|
+
### Section 11.3: Many Headings
|
|
992
|
+
|
|
993
|
+
#### Subsection 11.3.1
|
|
994
|
+
|
|
995
|
+
Content for subsection 11.3.1.
|
|
996
|
+
|
|
997
|
+
#### Subsection 11.3.2
|
|
998
|
+
|
|
999
|
+
Content for subsection 11.3.2.
|
|
1000
|
+
|
|
1001
|
+
#### Subsection 11.3.3
|
|
1002
|
+
|
|
1003
|
+
Content for subsection 11.3.3.
|
|
1004
|
+
|
|
1005
|
+
#### Subsection 11.3.4
|
|
1006
|
+
|
|
1007
|
+
Content for subsection 11.3.4.
|
|
1008
|
+
|
|
1009
|
+
#### Subsection 11.3.5
|
|
1010
|
+
|
|
1011
|
+
Content for subsection 11.3.5.
|
|
1012
|
+
|
|
1013
|
+
#### Subsection 11.3.6
|
|
1014
|
+
|
|
1015
|
+
Content for subsection 11.3.6.
|
|
1016
|
+
|
|
1017
|
+
#### Subsection 11.3.7
|
|
1018
|
+
|
|
1019
|
+
Content for subsection 11.3.7.
|
|
1020
|
+
|
|
1021
|
+
#### Subsection 11.3.8
|
|
1022
|
+
|
|
1023
|
+
Content for subsection 11.3.8.
|
|
1024
|
+
|
|
1025
|
+
#### Subsection 11.3.9
|
|
1026
|
+
|
|
1027
|
+
Content for subsection 11.3.9.
|
|
1028
|
+
|
|
1029
|
+
#### Subsection 11.3.10
|
|
1030
|
+
|
|
1031
|
+
Content for subsection 11.3.10.
|
|
1032
|
+
|
|
1033
|
+
## Chapter 12: Edge Cases and Special Situations
|
|
1034
|
+
|
|
1035
|
+
### Empty Sections
|
|
1036
|
+
|
|
1037
|
+
This section intentionally contains minimal content to test edge cases.
|
|
1038
|
+
|
|
1039
|
+
### Special Characters in Content
|
|
1040
|
+
|
|
1041
|
+
Testing special characters: < > & " ' ` { } [ ] ( ) * _ # - + = | \ / ~ ^
|
|
1042
|
+
|
|
1043
|
+
### Code Blocks with Special Content
|
|
1044
|
+
|
|
1045
|
+
```
|
|
1046
|
+
This code block contains:
|
|
1047
|
+
- Special characters: < > & " '
|
|
1048
|
+
- Various symbols: { } [ ] ( ) * _ # - + = | \ / ~ ^
|
|
1049
|
+
- Unicode: © ® ™ € £ ¥ § ¶ ° ± × ÷
|
|
1050
|
+
```
|
|
1051
|
+
|
|
1052
|
+
### Tables with Special Content
|
|
1053
|
+
|
|
1054
|
+
| Special | Characters | Content |
|
|
1055
|
+
|---------|------------|---------|
|
|
1056
|
+
| < > & | " ' ` | { } [ ] |
|
|
1057
|
+
| ( ) * | _ # - | + = | \ |
|
|
1058
|
+
| / ~ ^ | © ® ™ | € £ ¥ |
|
|
1059
|
+
|
|
1060
|
+
### Links with Special Characters
|
|
1061
|
+
|
|
1062
|
+
- [Link with &](https://example.com?q=test¶m=value)
|
|
1063
|
+
- [Link with #](https://example.com#section)
|
|
1064
|
+
- [Link with +](https://example.com?q=test+value)
|
|
1065
|
+
|
|
1066
|
+
## Chapter 13: Metadata and Variables
|
|
1067
|
+
|
|
1068
|
+
This document includes YAML front matter with metadata. The metadata can be referenced using variable syntax:
|
|
1069
|
+
|
|
1070
|
+
- Title: [%title]
|
|
1071
|
+
- Author: [%author]
|
|
1072
|
+
- Date: [%date]
|
|
1073
|
+
- Version: [%version]
|
|
1074
|
+
- Description: [%description]
|
|
1075
|
+
|
|
1076
|
+
## Chapter 14: Conclusion
|
|
1077
|
+
|
|
1078
|
+
This large test document has demonstrated:
|
|
1079
|
+
|
|
1080
|
+
- Various markdown syntax elements
|
|
1081
|
+
- Multiple code languages
|
|
1082
|
+
- Complex nested structures
|
|
1083
|
+
- Tables with different formats
|
|
1084
|
+
- Links and references
|
|
1085
|
+
- Images and media
|
|
1086
|
+
- Blockquotes and callouts
|
|
1087
|
+
- Special characters and edge cases
|
|
1088
|
+
- Performance testing scenarios
|
|
1089
|
+
|
|
1090
|
+
The document is designed to be comprehensive enough to test the Apex markdown processor thoroughly while remaining readable and maintainable.
|
|
1091
|
+
|
|
1092
|
+
---
|
|
1093
|
+
|
|
1094
|
+
*End of test document*
|