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,3981 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
|
|
6
|
+
<meta charset="UTF-8">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
8
|
+
<meta name="generator" content="Apex 0.1.49">
|
|
9
|
+
<title>Document</title>
|
|
10
|
+
<style>
|
|
11
|
+
body {
|
|
12
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
|
|
13
|
+
line-height: 1.6;
|
|
14
|
+
max-width: 800px;
|
|
15
|
+
margin: 2rem auto;
|
|
16
|
+
padding: 0 1rem;
|
|
17
|
+
color: #333;
|
|
18
|
+
}
|
|
19
|
+
pre { background: #f5f5f5; padding: 1rem; overflow-x: auto; }
|
|
20
|
+
code { background: #f0f0f0; padding: 0.2em 0.4em; border-radius: 3px; }
|
|
21
|
+
blockquote { border-left: 4px solid #ddd; margin: 0; padding-left: 1rem; color: #666; }
|
|
22
|
+
table { border-collapse: collapse; width: 100%%; }
|
|
23
|
+
th, td { border: 1px solid #ddd; padding: 0.5rem; }
|
|
24
|
+
th { background: #f5f5f5; }
|
|
25
|
+
tfoot td { background: #e8e8e8; }
|
|
26
|
+
figure.table-figure { width: fit-content; margin: 1em 0; }
|
|
27
|
+
figure.table-figure table { width: auto; }
|
|
28
|
+
figcaption { text-align: center; font-weight: bold; font-size: 0.8em; }
|
|
29
|
+
.page-break { page-break-after: always; }
|
|
30
|
+
.callout { padding: 1rem; margin: 1rem 0; border-left: 4px solid; }
|
|
31
|
+
.callout-note { border-color: #3b82f6; background: #eff6ff; }
|
|
32
|
+
.callout-warning { border-color: #f59e0b; background: #fffbeb; }
|
|
33
|
+
.callout-tip { border-color: #10b981; background: #f0fdf4; }
|
|
34
|
+
.callout-danger { border-color: #ef4444; background: #fef2f2; }
|
|
35
|
+
ins { background: #d4fcbc; text-decoration: none; }
|
|
36
|
+
del { background: #fbb6c2; text-decoration: line-through; }
|
|
37
|
+
mark { background: #fff3cd; }
|
|
38
|
+
.critic.comment { background: #e7e7e7; color: #666; font-style: italic; }
|
|
39
|
+
</style>
|
|
40
|
+
<style>
|
|
41
|
+
/* Base styles */
|
|
42
|
+
body {
|
|
43
|
+
-webkit-font-smoothing: antialiased;
|
|
44
|
+
-moz-osx-font-smoothing: grayscale;
|
|
45
|
+
font-size: 17px;
|
|
46
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
47
|
+
"Helvetica Neue", Arial, sans-serif;
|
|
48
|
+
line-height: 1.65;
|
|
49
|
+
color: #1e293b;
|
|
50
|
+
background-color: #fff;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Sidebar / Main TOC - wider on larger screens */
|
|
54
|
+
.main-toc,
|
|
55
|
+
.sidebar {
|
|
56
|
+
position: fixed;
|
|
57
|
+
left: 0;
|
|
58
|
+
top: 0;
|
|
59
|
+
width: auto;
|
|
60
|
+
min-width: 180px;
|
|
61
|
+
max-width: 250px;
|
|
62
|
+
height: 100vh;
|
|
63
|
+
overflow-y: auto;
|
|
64
|
+
background: #1e293b;
|
|
65
|
+
color: rgba(255, 255, 255, 0.9);
|
|
66
|
+
border-right: 2px solid rgba(255, 255, 255, 0.1);
|
|
67
|
+
padding: 24px 20px 130px;
|
|
68
|
+
font-size: 14px;
|
|
69
|
+
z-index: 100;
|
|
70
|
+
margin-right: 1rem;
|
|
71
|
+
box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
|
|
72
|
+
transition: transform 0.3s ease;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.main-toc ul,
|
|
76
|
+
.sidebar ul {
|
|
77
|
+
list-style: none;
|
|
78
|
+
padding-left: 0;
|
|
79
|
+
margin: 0;
|
|
80
|
+
padding-bottom: 80px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.main-toc ul::after,
|
|
84
|
+
.sidebar ul::after {
|
|
85
|
+
content: "";
|
|
86
|
+
display: block;
|
|
87
|
+
height: 80px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.main-toc li,
|
|
91
|
+
.sidebar li {
|
|
92
|
+
margin: 0.25em 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.main-toc a,
|
|
96
|
+
.sidebar a {
|
|
97
|
+
color: rgba(255, 255, 255, 0.85);
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
display: block;
|
|
100
|
+
padding: 6px 12px;
|
|
101
|
+
border-radius: 4px;
|
|
102
|
+
transition: all 0.15s ease;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
text-overflow: ellipsis;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.main-toc a:hover,
|
|
109
|
+
.sidebar a:hover {
|
|
110
|
+
background: #334155;
|
|
111
|
+
color: #fff;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.sidebar a.active {
|
|
115
|
+
color: #0ea5e9;
|
|
116
|
+
font-weight: 500;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Body margin for sidebar */
|
|
120
|
+
body {
|
|
121
|
+
margin-left: 270px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Hamburger menu button */
|
|
125
|
+
.hamburger-menu {
|
|
126
|
+
display: none;
|
|
127
|
+
position: fixed;
|
|
128
|
+
top: 12px;
|
|
129
|
+
left: 12px;
|
|
130
|
+
z-index: 200;
|
|
131
|
+
background: #1e293b;
|
|
132
|
+
border: 2px solid rgba(255, 255, 255, 0.1);
|
|
133
|
+
border-radius: 6px;
|
|
134
|
+
padding: 10px;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
color: rgba(255, 255, 255, 0.9);
|
|
137
|
+
font-size: 20px;
|
|
138
|
+
line-height: 1;
|
|
139
|
+
width: 44px;
|
|
140
|
+
height: 44px;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
144
|
+
transition: all 0.2s ease;
|
|
145
|
+
opacity: 0.2;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.hamburger-menu:hover {
|
|
149
|
+
background: #334155;
|
|
150
|
+
color: #fff;
|
|
151
|
+
opacity: 1;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Move hamburger to the right of the sidebar when menu is open */
|
|
155
|
+
.hamburger-menu.active {
|
|
156
|
+
left: calc(
|
|
157
|
+
250px + 12px
|
|
158
|
+
); /* Position just to the right of sidebar (max-width 250px + 12px padding) */
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.hamburger-menu.active {
|
|
162
|
+
background: #0ea5e9;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.hamburger-menu::before {
|
|
166
|
+
content: "☰";
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.hamburger-menu.active::before {
|
|
170
|
+
content: "✕";
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Mobile menu overlay */
|
|
174
|
+
.mobile-menu-overlay {
|
|
175
|
+
display: none;
|
|
176
|
+
position: fixed;
|
|
177
|
+
top: 0;
|
|
178
|
+
left: 0;
|
|
179
|
+
right: 0;
|
|
180
|
+
bottom: 0;
|
|
181
|
+
background: rgba(0, 0, 0, 0.5);
|
|
182
|
+
z-index: 150;
|
|
183
|
+
opacity: 0;
|
|
184
|
+
visibility: hidden;
|
|
185
|
+
transition: opacity 0.3s ease, visibility 0.3s ease;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.mobile-menu-overlay.active {
|
|
189
|
+
opacity: 1;
|
|
190
|
+
visibility: visible;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Page TOC */
|
|
194
|
+
.page-toc {
|
|
195
|
+
background: #f9f9f9;
|
|
196
|
+
border: 1px solid #ddd;
|
|
197
|
+
border-radius: 4px;
|
|
198
|
+
padding: 1rem;
|
|
199
|
+
margin: 1.5rem 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.page-toc ul {
|
|
203
|
+
list-style: none;
|
|
204
|
+
padding-left: 0;
|
|
205
|
+
margin: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.page-toc > ul {
|
|
209
|
+
padding-left: 0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.page-toc li {
|
|
213
|
+
margin: 0.25em 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.page-toc a {
|
|
217
|
+
color: #0066cc;
|
|
218
|
+
text-decoration: none;
|
|
219
|
+
display: block;
|
|
220
|
+
padding: 0.25em 0.5em;
|
|
221
|
+
border-radius: 3px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.page-toc a:hover {
|
|
225
|
+
background: #e0e0e0;
|
|
226
|
+
color: #004499;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.page-toc ul ul {
|
|
230
|
+
list-style: none;
|
|
231
|
+
padding-left: 1.5em;
|
|
232
|
+
margin-top: 0.25em;
|
|
233
|
+
margin-left: 0;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.page-toc ul ul ul {
|
|
237
|
+
padding-left: 1.5em;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.page-toc ul ul a {
|
|
241
|
+
font-size: 0.9em;
|
|
242
|
+
color: #555;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.page-toc ul ul ul a {
|
|
246
|
+
font-size: 0.85em;
|
|
247
|
+
color: #666;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* Floating TOC */
|
|
251
|
+
.floating-toc {
|
|
252
|
+
position: fixed;
|
|
253
|
+
top: 0;
|
|
254
|
+
left: 270px;
|
|
255
|
+
right: 0;
|
|
256
|
+
z-index: 50;
|
|
257
|
+
opacity: 0;
|
|
258
|
+
visibility: hidden;
|
|
259
|
+
transition: opacity 0.2s ease, visibility 0.2s ease;
|
|
260
|
+
pointer-events: none;
|
|
261
|
+
display: flex;
|
|
262
|
+
justify-content: flex-end;
|
|
263
|
+
padding-right: 2rem;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.floating-toc.visible {
|
|
267
|
+
opacity: 1;
|
|
268
|
+
visibility: visible;
|
|
269
|
+
pointer-events: auto;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.floating-toc-container {
|
|
273
|
+
background: rgba(255, 255, 255, 0.95);
|
|
274
|
+
backdrop-filter: blur(10px);
|
|
275
|
+
border-bottom: 1px solid #ddd;
|
|
276
|
+
border-radius: 0 0 12px 12px;
|
|
277
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
278
|
+
width: fit-content;
|
|
279
|
+
max-width: 400px;
|
|
280
|
+
min-width: 200px;
|
|
281
|
+
overflow: hidden;
|
|
282
|
+
transition: max-height 0.3s ease;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.floating-toc-header {
|
|
286
|
+
padding: 8px 16px;
|
|
287
|
+
cursor: pointer;
|
|
288
|
+
user-select: none;
|
|
289
|
+
font-size: 14px;
|
|
290
|
+
font-weight: 500;
|
|
291
|
+
color: #1e293b;
|
|
292
|
+
display: flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
justify-content: space-between;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.floating-toc-header:hover {
|
|
298
|
+
background: rgba(0, 0, 0, 0.02);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.floating-toc-content {
|
|
302
|
+
max-height: 0;
|
|
303
|
+
overflow: hidden;
|
|
304
|
+
transition: max-height 0.3s ease;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.floating-toc-container:hover .floating-toc-content {
|
|
308
|
+
max-height: 70vh;
|
|
309
|
+
overflow-y: auto;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.floating-toc-content ul {
|
|
313
|
+
list-style: none;
|
|
314
|
+
padding: 8px 16px 16px;
|
|
315
|
+
margin: 0;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.floating-toc-content li {
|
|
319
|
+
margin: 0.1em 0;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.floating-toc-content a {
|
|
323
|
+
color: #0066cc;
|
|
324
|
+
text-decoration: none;
|
|
325
|
+
display: block;
|
|
326
|
+
padding: 0.2em 0.5em;
|
|
327
|
+
border-radius: 4px;
|
|
328
|
+
font-size: 13px;
|
|
329
|
+
transition: background 0.15s ease;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.floating-toc-content a:hover {
|
|
333
|
+
background: #e0e0e0;
|
|
334
|
+
color: #004499;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.floating-toc-content ul ul {
|
|
338
|
+
padding-left: 1.2em;
|
|
339
|
+
margin-top: 0;
|
|
340
|
+
margin-bottom: 0;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.floating-toc-content ul ul ul {
|
|
344
|
+
margin-top: 0;
|
|
345
|
+
margin-bottom: 0;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.floating-toc-content ul ul a {
|
|
349
|
+
font-size: 12px;
|
|
350
|
+
color: #555;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.floating-toc-content ul ul ul a {
|
|
354
|
+
font-size: 11px;
|
|
355
|
+
color: #666;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/* Smooth scrolling */
|
|
359
|
+
html {
|
|
360
|
+
scroll-behavior: smooth;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* Code blocks */
|
|
364
|
+
code {
|
|
365
|
+
background: #f0f0f0;
|
|
366
|
+
padding: 0.2em 0.4em;
|
|
367
|
+
border-radius: 3px;
|
|
368
|
+
font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
|
|
369
|
+
font-size: 0.9em;
|
|
370
|
+
margin: 0 0.1em;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
pre {
|
|
374
|
+
background: #f5f5f5;
|
|
375
|
+
padding: 1rem;
|
|
376
|
+
overflow-x: auto;
|
|
377
|
+
border-radius: 4px;
|
|
378
|
+
margin: 1em 0;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
pre code {
|
|
382
|
+
background: none;
|
|
383
|
+
padding: 0;
|
|
384
|
+
margin: 0;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/* Rouge syntax highlighting - GitHub theme, scoped to .highlight containers */
|
|
388
|
+
.highlight {
|
|
389
|
+
color: #24292e;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.highlight .c {
|
|
393
|
+
color: #6a737d;
|
|
394
|
+
font-style: italic;
|
|
395
|
+
} /* Comment */
|
|
396
|
+
.highlight .err {
|
|
397
|
+
color: #a61717;
|
|
398
|
+
background-color: #e3d2d2;
|
|
399
|
+
} /* Error */
|
|
400
|
+
.highlight .k {
|
|
401
|
+
color: #d73a49;
|
|
402
|
+
font-weight: bold;
|
|
403
|
+
} /* Keyword */
|
|
404
|
+
.highlight .l {
|
|
405
|
+
color: #032f62;
|
|
406
|
+
} /* Literal */
|
|
407
|
+
.highlight .n {
|
|
408
|
+
color: #24292e;
|
|
409
|
+
} /* Name */
|
|
410
|
+
.highlight .o {
|
|
411
|
+
color: #d73a49;
|
|
412
|
+
} /* Operator */
|
|
413
|
+
.highlight .p {
|
|
414
|
+
color: #24292e;
|
|
415
|
+
} /* Punctuation */
|
|
416
|
+
.highlight .cm {
|
|
417
|
+
color: #6a737d;
|
|
418
|
+
font-style: italic;
|
|
419
|
+
} /* Comment.Multiline */
|
|
420
|
+
.highlight .cp {
|
|
421
|
+
color: #6a737d;
|
|
422
|
+
font-weight: bold;
|
|
423
|
+
} /* Comment.Preproc */
|
|
424
|
+
.highlight .c1 {
|
|
425
|
+
color: #6a737d;
|
|
426
|
+
font-style: italic;
|
|
427
|
+
} /* Comment.Single */
|
|
428
|
+
.highlight .cs {
|
|
429
|
+
color: #6a737d;
|
|
430
|
+
font-weight: bold;
|
|
431
|
+
font-style: italic;
|
|
432
|
+
} /* Comment.Special */
|
|
433
|
+
.highlight .gd {
|
|
434
|
+
color: #24292e;
|
|
435
|
+
background-color: #ffeef0;
|
|
436
|
+
} /* Generic.Deleted */
|
|
437
|
+
.highlight .ge {
|
|
438
|
+
color: #24292e;
|
|
439
|
+
font-style: italic;
|
|
440
|
+
} /* Generic.Emph */
|
|
441
|
+
.highlight .gr {
|
|
442
|
+
color: #aa0000;
|
|
443
|
+
} /* Generic.Error */
|
|
444
|
+
.highlight .gh {
|
|
445
|
+
color: #999999;
|
|
446
|
+
font-weight: bold;
|
|
447
|
+
} /* Generic.Heading */
|
|
448
|
+
.highlight .gi {
|
|
449
|
+
color: #24292e;
|
|
450
|
+
background-color: #f0fff4;
|
|
451
|
+
} /* Generic.Inserted */
|
|
452
|
+
.highlight .go {
|
|
453
|
+
color: #888888;
|
|
454
|
+
} /* Generic.Output */
|
|
455
|
+
.highlight .gp {
|
|
456
|
+
color: #555555;
|
|
457
|
+
} /* Generic.Prompt */
|
|
458
|
+
.highlight .gs {
|
|
459
|
+
font-weight: bold;
|
|
460
|
+
} /* Generic.Strong */
|
|
461
|
+
.highlight .gu {
|
|
462
|
+
color: #aaaaaa;
|
|
463
|
+
} /* Generic.Subheading */
|
|
464
|
+
.highlight .gt {
|
|
465
|
+
color: #aa0000;
|
|
466
|
+
} /* Generic.Traceback */
|
|
467
|
+
.highlight .kc {
|
|
468
|
+
color: #d73a49;
|
|
469
|
+
font-weight: bold;
|
|
470
|
+
} /* Keyword.Constant */
|
|
471
|
+
.highlight .kd {
|
|
472
|
+
color: #d73a49;
|
|
473
|
+
font-weight: bold;
|
|
474
|
+
} /* Keyword.Declaration */
|
|
475
|
+
.highlight .kn {
|
|
476
|
+
color: #d73a49;
|
|
477
|
+
font-weight: bold;
|
|
478
|
+
} /* Keyword.Namespace */
|
|
479
|
+
.highlight .kp {
|
|
480
|
+
color: #d73a49;
|
|
481
|
+
font-weight: bold;
|
|
482
|
+
} /* Keyword.Pseudo */
|
|
483
|
+
.highlight .kr {
|
|
484
|
+
color: #d73a49;
|
|
485
|
+
font-weight: bold;
|
|
486
|
+
} /* Keyword.Reserved */
|
|
487
|
+
.highlight .kt {
|
|
488
|
+
color: #d73a49;
|
|
489
|
+
font-weight: bold;
|
|
490
|
+
} /* Keyword.Type */
|
|
491
|
+
.highlight .ld {
|
|
492
|
+
color: #032f62;
|
|
493
|
+
} /* Literal.Date */
|
|
494
|
+
.highlight .m {
|
|
495
|
+
color: #005cc5;
|
|
496
|
+
} /* Literal.Number */
|
|
497
|
+
.highlight .s {
|
|
498
|
+
color: #032f62;
|
|
499
|
+
} /* Literal.String */
|
|
500
|
+
.highlight .na {
|
|
501
|
+
color: #6f42c1;
|
|
502
|
+
} /* Name.Attribute */
|
|
503
|
+
.highlight .nb {
|
|
504
|
+
color: #005cc5;
|
|
505
|
+
} /* Name.Builtin */
|
|
506
|
+
.highlight .nc {
|
|
507
|
+
color: #6f42c1;
|
|
508
|
+
font-weight: bold;
|
|
509
|
+
} /* Name.Class */
|
|
510
|
+
.highlight .no {
|
|
511
|
+
color: #005cc5;
|
|
512
|
+
} /* Name.Constant */
|
|
513
|
+
.highlight .nd {
|
|
514
|
+
color: #6f42c1;
|
|
515
|
+
font-weight: bold;
|
|
516
|
+
} /* Name.Decorator */
|
|
517
|
+
.highlight .ni {
|
|
518
|
+
color: #800080;
|
|
519
|
+
} /* Name.Entity */
|
|
520
|
+
.highlight .ne {
|
|
521
|
+
color: #990000;
|
|
522
|
+
font-weight: bold;
|
|
523
|
+
} /* Name.Exception */
|
|
524
|
+
.highlight .nf {
|
|
525
|
+
color: #6f42c1;
|
|
526
|
+
} /* Name.Function */
|
|
527
|
+
.highlight .nl {
|
|
528
|
+
color: #990000;
|
|
529
|
+
} /* Name.Label */
|
|
530
|
+
.highlight .nn {
|
|
531
|
+
color: #555555;
|
|
532
|
+
} /* Name.Namespace */
|
|
533
|
+
.highlight .nx {
|
|
534
|
+
color: #6f42c1;
|
|
535
|
+
} /* Name.Other */
|
|
536
|
+
.highlight .py {
|
|
537
|
+
color: #990000;
|
|
538
|
+
} /* Name.Property */
|
|
539
|
+
.highlight .nt {
|
|
540
|
+
color: #22863a;
|
|
541
|
+
} /* Name.Tag */
|
|
542
|
+
.highlight .nv {
|
|
543
|
+
color: #e36209;
|
|
544
|
+
} /* Name.Variable */
|
|
545
|
+
.highlight .ow {
|
|
546
|
+
color: #d73a49;
|
|
547
|
+
font-weight: bold;
|
|
548
|
+
} /* Operator.Word */
|
|
549
|
+
.highlight .w {
|
|
550
|
+
color: #bbbbbb;
|
|
551
|
+
} /* Text.Whitespace */
|
|
552
|
+
.highlight .mf {
|
|
553
|
+
color: #005cc5;
|
|
554
|
+
} /* Literal.Number.Float */
|
|
555
|
+
.highlight .mh {
|
|
556
|
+
color: #005cc5;
|
|
557
|
+
} /* Literal.Number.Hex */
|
|
558
|
+
.highlight .mi {
|
|
559
|
+
color: #005cc5;
|
|
560
|
+
} /* Literal.Number.Integer */
|
|
561
|
+
.highlight .mo {
|
|
562
|
+
color: #005cc5;
|
|
563
|
+
} /* Literal.Number.Oct */
|
|
564
|
+
.highlight .sb {
|
|
565
|
+
color: #032f62;
|
|
566
|
+
} /* Literal.String.Backtick */
|
|
567
|
+
.highlight .sc {
|
|
568
|
+
color: #032f62;
|
|
569
|
+
} /* Literal.String.Char */
|
|
570
|
+
.highlight .sd {
|
|
571
|
+
color: #032f62;
|
|
572
|
+
} /* Literal.String.Doc */
|
|
573
|
+
.highlight .s2 {
|
|
574
|
+
color: #032f62;
|
|
575
|
+
} /* Literal.String.Double */
|
|
576
|
+
.highlight .se {
|
|
577
|
+
color: #032f62;
|
|
578
|
+
} /* Literal.String.Escape */
|
|
579
|
+
.highlight .sh {
|
|
580
|
+
color: #032f62;
|
|
581
|
+
} /* Literal.String.Heredoc */
|
|
582
|
+
.highlight .si {
|
|
583
|
+
color: #032f62;
|
|
584
|
+
} /* Literal.String.Interpol */
|
|
585
|
+
.highlight .sx {
|
|
586
|
+
color: #032f62;
|
|
587
|
+
} /* Literal.String.Other */
|
|
588
|
+
.highlight .sr {
|
|
589
|
+
color: #22863a;
|
|
590
|
+
} /* Literal.String.Regex */
|
|
591
|
+
.highlight .s1 {
|
|
592
|
+
color: #032f62;
|
|
593
|
+
} /* Literal.String.Single */
|
|
594
|
+
.highlight .ss {
|
|
595
|
+
color: #032f62;
|
|
596
|
+
} /* Literal.String.Symbol */
|
|
597
|
+
.highlight .bp {
|
|
598
|
+
color: #005cc5;
|
|
599
|
+
} /* Name.Builtin.Pseudo */
|
|
600
|
+
.highlight .vc {
|
|
601
|
+
color: #e36209;
|
|
602
|
+
} /* Name.Variable.Class */
|
|
603
|
+
.highlight .vg {
|
|
604
|
+
color: #e36209;
|
|
605
|
+
} /* Name.Variable.Global */
|
|
606
|
+
.highlight .vi {
|
|
607
|
+
color: #e36209;
|
|
608
|
+
} /* Name.Variable.Instance */
|
|
609
|
+
.highlight .il {
|
|
610
|
+
color: #005cc5;
|
|
611
|
+
} /* Literal.Number.Integer.Long */
|
|
612
|
+
|
|
613
|
+
/* Additional Rouge token classes that may be used */
|
|
614
|
+
.highlight .token {
|
|
615
|
+
color: #5670a0;
|
|
616
|
+
}
|
|
617
|
+
.highlight .token.list {
|
|
618
|
+
color: #546e9f;
|
|
619
|
+
}
|
|
620
|
+
.highlight .token.punctuation {
|
|
621
|
+
color: #3e8dad;
|
|
622
|
+
}
|
|
623
|
+
.highlight .token.list.punctuation {
|
|
624
|
+
color: #e05b78;
|
|
625
|
+
}
|
|
626
|
+
.highlight .token.content {
|
|
627
|
+
padding: 0;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/* Nested lists in page content */
|
|
631
|
+
ul ul,
|
|
632
|
+
ol ol,
|
|
633
|
+
ul ol,
|
|
634
|
+
ol ul {
|
|
635
|
+
padding-left: 1.5em;
|
|
636
|
+
margin-top: 0.25em;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/* Page footer */
|
|
640
|
+
.page-footer {
|
|
641
|
+
background: #f5f5f5;
|
|
642
|
+
border-top: 1px solid #ddd;
|
|
643
|
+
padding: 1.5rem;
|
|
644
|
+
margin-top: 3rem;
|
|
645
|
+
color: #666;
|
|
646
|
+
font-size: 0.9em;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.page-footer p {
|
|
650
|
+
margin: 0.5em 0;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.page-footer a {
|
|
654
|
+
color: #0066cc;
|
|
655
|
+
text-decoration: none;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.page-footer a:hover {
|
|
659
|
+
text-decoration: underline;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/* Mobile responsive */
|
|
663
|
+
@media (max-width: 768px) {
|
|
664
|
+
.hamburger-menu {
|
|
665
|
+
display: flex;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.main-toc,
|
|
669
|
+
.sidebar {
|
|
670
|
+
transform: translateX(-100%);
|
|
671
|
+
z-index: 175;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.main-toc.mobile-open,
|
|
675
|
+
.sidebar.mobile-open {
|
|
676
|
+
transform: translateX(0);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
body {
|
|
680
|
+
margin-left: 0;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.floating-toc {
|
|
684
|
+
left: 0;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
</style></head>
|
|
689
|
+
|
|
690
|
+
<body>
|
|
691
|
+
<div class="floating-toc" id="floating-toc">
|
|
692
|
+
<div class="floating-toc-container">
|
|
693
|
+
<div class="floating-toc-header">
|
|
694
|
+
<span>Table of Contents 🔻</span>
|
|
695
|
+
</div>
|
|
696
|
+
<div class="floating-toc-content" id="floating-toc-content">
|
|
697
|
+
<!-- Content will be populated by JavaScript -->
|
|
698
|
+
</div>
|
|
699
|
+
</div>
|
|
700
|
+
</div>
|
|
701
|
+
|
|
702
|
+
<button class="hamburger-menu" id="hamburger-menu" aria-label="Toggle navigation"></button>
|
|
703
|
+
<div class="mobile-menu-overlay" id="mobile-menu-overlay"></div>
|
|
704
|
+
|
|
705
|
+
<nav class="main-toc"><ul><li><a href="Home.html">Home</a></li><li><a href="Getting-Started.html">Getting Started</a></li><li><a href="Installation.html">Installation</a></li><li><a href="Usage.html">Usage</a></li><li><a href="Syntax.html">Syntax</a></li><li><a href="Inline-Attribute-Lists.html">Inline Attribute Lists</a></li><li><a href="Modes.html">Modes</a></li><li><a href="Command-Line-Options.html">Command Line Options</a></li><li><a href="Multi-File-Documents.html">Multi-file Documents</a></li><li><a href="Citations.html">Citations</a></li><li><a href="Metadata-Transforms.html">Metadata Transforms</a></li><li><a href="Pandoc-Integration.html">Integrating with Pandoc</a></li><li><a href="Header-IDs.html">Header IDs</a></li><li><a href="C-API.html">C API</a></li><li><a href="Xcode-Integration.html">Xcode Integration</a></li><li><a href="Examples.html">Examples</a></li><li><a href="Plugins.html">Plugins</a></li><li><a href="Troubleshooting.html">Troubleshooting</a></li><li><a href="Credits.html">Credits</a></li></ul></nav>
|
|
706
|
+
|
|
707
|
+
<h1 id="syntax-reference">
|
|
708
|
+
Syntax Reference
|
|
709
|
+
</h1>
|
|
710
|
+
<nav class="page-toc" id="page-toc-top"><ul><li><a href="#syntax-reference">Syntax Reference</a><ul><li><a href="#basic-markdown">Basic Markdown</a><ul><li><a href="#headers">Headers</a></li><li><a href="#emphasis">Emphasis</a></li><li><a href="#superscript-and-subscript">Superscript and Subscript</a></li><li><a href="#lists">Lists</a></li><li><a href="#links-and-images">Links and Images</a></li><li><a href="#code">Code</a></li><li><a href="#blockquotes">Blockquotes</a></li><li><a href="#horizontal-rules">Horizontal Rules</a></li></ul></li><li><a href="#tables">Tables</a><ul><li><a href="#standard-tables">Standard Tables</a></li><li><a href="#relaxed-tables">Relaxed Tables</a></li><li><a href="#headerless-tables">Headerless Tables</a><ul><li><a href="#row-header-columns">Row header columns</a></li></ul></li><li><a href="#inline-tables-from-csvtsv">Inline Tables from CSV/TSV</a><ul><li><a href="#fenced-csvtsv-tables">Fenced CSV/TSV tables</a></li><li><a href="#alignment-rows-in-csvtsv-tables">Alignment rows in CSV/TSV tables</a></li><li><a href="#table-markers"><!--TABLE--> markers</a></li></ul></li></ul></li><li><a href="#footnotes">Footnotes</a><ul><li><a href="#reference-style">Reference Style</a></li><li><a href="#inline-style-kramdown">Inline Style (Kramdown)</a></li><li><a href="#inline-style-multimarkdown">Inline Style (MultiMarkdown)</a></li></ul></li><li><a href="#definition-lists">Definition Lists</a></li><li><a href="#citations">Citations</a><ul><li><a href="#pandoc-citation-syntax">Pandoc Citation Syntax</a></li><li><a href="#multimarkdown-citation-syntax">MultiMarkdown Citation Syntax</a></li><li><a href="#mmark-citation-syntax">mmark Citation Syntax</a></li><li><a href="#bibliography">Bibliography</a></li></ul></li><li><a href="#indices">Indices</a><ul><li><a href="#mmark-index-syntax">mmark Index Syntax</a></li><li><a href="#textindex-syntax">TextIndex Syntax</a></li><li><a href="#index-generation">Index Generation</a></li></ul></li><li><a href="#math">Math</a></li><li><a href="#wiki-links">Wiki Links</a></li><li><a href="#critic-markup">Critic Markup</a></li><li><a href="#callouts">Callouts</a></li><li><a href="#file-includes">File Includes</a><ul><li><a href="#apexoptions">apex_options</a></li></ul></li><li><a href="#core-functions">Core Functions</a><ul><li><a href="#apexoptionsdefault">apex_options_default</a></li><li><a href="#apexoptionsformode">apex_options_for_mode</a></li><li><a href="#apexmarkdowntohtml">apex_markdown_to_html</a></li><li><a href="#apexfreestring">apex_free_string</a></li><li><a href="#apexwraphtmldocument">apex_wrap_html_document</a></li><li><a href="#apexprettyprinthtml">apex_pretty_print_html</a></li></ul></li><li><a href="#version-functions">Version Functions</a><ul><li><a href="#apexversionstring">apex_version_string</a></li><li><a href="#apexversionmajor-apexversionminor-apexversionpatch">apex_version_major / apex_version_minor / apex_version_patch</a></li></ul></li><li><a href="#list-options">List Options</a><ul><li><a href="#mixed-list-markers">Mixed List Markers</a></li><li><a href="#alpha-lists">Alpha Lists</a></li></ul></li><li><a href="#feature-flags">Feature Flags</a></li><li><a href="#metadata-options">Metadata Options</a></li><li><a href="#file-inclusion">File Inclusion</a></li><li><a href="#output-options">Output Options</a></li><li><a href="#line-break-options">Line Break Options</a></li><li><a href="#header-id-options">Header ID Options</a></li><li><a href="#table-options">Table Options</a></li><li><a href="#complete-example">Complete Example</a></li><li><a href="#compiling-and-linking">Compiling and Linking</a><ul><li><a href="#with-cmake">With CMake</a></li><li><a href="#manual-compilation">Manual Compilation</a></li><li><a href="#static-linking">Static Linking</a></li></ul></li><li><a href="#thread-safety">Thread Safety</a></li><li><a href="#memory-management">Memory Management</a></li><li><a href="#error-handling">Error Handling</a></li><li><a href="#performance-tips">Performance Tips</a></li><li><a href="#related">Related</a><ul><li><a href="#address-syntax-for-file-includes">Address Syntax for File Includes</a></li><li><a href="#address-syntax-for-file-includes">Address Syntax for File Includes</a></li></ul></li><li><a href="#metadata">Metadata</a><ul><li><a href="#yaml-front-matter">YAML Front Matter</a></li><li><a href="#multimarkdown-metadata">MultiMarkdown Metadata</a></li><li><a href="#pandoc-title-block">Pandoc Title Block</a></li><li><a href="#metadata-variables">Metadata Variables</a></li></ul></li><li><a href="#abbreviations">Abbreviations</a></li><li><a href="#inline-attribute-lists-ial">Inline Attribute Lists (IAL)</a></li><li><a href="#table-of-contents">Table of Contents</a></li><li><a href="#smart-typography">Smart Typography</a></li><li><a href="#github-emoji">GitHub Emoji</a></li><li><a href="#special-markers">Special Markers</a></li><li><a href="#html">HTML</a><ul><li><a href="#markdown-inside-html-blocks">Markdown Inside HTML Blocks</a></li><li><a href="#pandoc-fenced-divs">Pandoc Fenced Divs</a></li></ul></li><li><a href="#related">Related</a></li></ul></li></ul></nav>
|
|
711
|
+
|
|
712
|
+
<p>
|
|
713
|
+
This page documents all syntax features available in <strong>unified mode</strong>. For mode-specific syntax, see <a href="Modes.html">Modes</a>.
|
|
714
|
+
</p>
|
|
715
|
+
|
|
716
|
+
<h2 id="basic-markdown">
|
|
717
|
+
Basic Markdown
|
|
718
|
+
</h2>
|
|
719
|
+
|
|
720
|
+
<h3 id="headers">
|
|
721
|
+
Headers
|
|
722
|
+
</h3>
|
|
723
|
+
|
|
724
|
+
<p>
|
|
725
|
+
<strong> ATX-style headers:</strong>
|
|
726
|
+
</p>
|
|
727
|
+
|
|
728
|
+
<pre><code class="highlight language-markdown"><span class="gh"># H1</span>
|
|
729
|
+
<span class="gu">## H2</span>
|
|
730
|
+
<span class="gu">### H3</span>
|
|
731
|
+
<span class="gu">#### H4</span>
|
|
732
|
+
<span class="gu">##### H5</span>
|
|
733
|
+
<span class="gu">###### H6</span>
|
|
734
|
+
</code></pre>
|
|
735
|
+
|
|
736
|
+
<p>
|
|
737
|
+
<strong> Setext-style headers:</strong>
|
|
738
|
+
</p>
|
|
739
|
+
|
|
740
|
+
<pre><code class="highlight language-markdown"><span class="gu">H1 Alternative
|
|
741
|
+
==============
|
|
742
|
+
</span>
|
|
743
|
+
<span class="gh">H2 Alternative
|
|
744
|
+
--------------
|
|
745
|
+
</span></code></pre>
|
|
746
|
+
|
|
747
|
+
<p>
|
|
748
|
+
<strong> Multi-line setext headers (<abbr title="MultiMarkdown">MMD</abbr> 6):</strong>
|
|
749
|
+
Setext headers can span multiple lines before the underline. This is supported in <strong>unified</strong> and <strong>MultiMarkdown</strong> modes:
|
|
750
|
+
</p>
|
|
751
|
+
|
|
752
|
+
<pre><code class="highlight language-markdown">This is
|
|
753
|
+
a multi-line
|
|
754
|
+
<span class="gu">setext header
|
|
755
|
+
========
|
|
756
|
+
</span>
|
|
757
|
+
Another
|
|
758
|
+
header
|
|
759
|
+
with
|
|
760
|
+
multiple
|
|
761
|
+
<span class="gh">lines
|
|
762
|
+
--------
|
|
763
|
+
</span></code></pre>
|
|
764
|
+
|
|
765
|
+
<h3 id="emphasis">
|
|
766
|
+
Emphasis
|
|
767
|
+
</h3>
|
|
768
|
+
|
|
769
|
+
<pre><code class="highlight language-markdown"><span class="ge">*italic*</span>
|
|
770
|
+
<span class="ge">_italic_</span>
|
|
771
|
+
<span class="gs">**bold**</span>
|
|
772
|
+
<span class="gs">__bold__</span>
|
|
773
|
+
<span class="ges">***bold italic***</span>
|
|
774
|
+
<span class="gs">___bold italic__</span>_
|
|
775
|
+
</code></pre>
|
|
776
|
+
|
|
777
|
+
<h3 id="superscript-and-subscript">
|
|
778
|
+
Superscript and Subscript
|
|
779
|
+
</h3>
|
|
780
|
+
|
|
781
|
+
<p>
|
|
782
|
+
MultiMarkdown-style superscript and subscript syntax:
|
|
783
|
+
</p>
|
|
784
|
+
|
|
785
|
+
<pre><code class="highlight language-markdown">H~2~O # H₂O (subscript - tildes within word)
|
|
786
|
+
m^2 # m² (superscript)
|
|
787
|
+
x^2 + y^2 # x² + y²
|
|
788
|
+
H~2~SO~4~ # H₂SO₄ (multiple subscripts within word)
|
|
789
|
+
~h2o~ # <span class="nt"><u></span>h2o<span class="nt"></u></span> (underline - tildes at word boundaries)
|
|
790
|
+
</code></pre>
|
|
791
|
+
|
|
792
|
+
<p>
|
|
793
|
+
<strong> Syntax rules:</strong>
|
|
794
|
+
</p>
|
|
795
|
+
|
|
796
|
+
<ul>
|
|
797
|
+
|
|
798
|
+
<li>
|
|
799
|
+
The <code>^</code> character creates superscript for the text immediately following it. The superscript stops at the first space, punctuation, or newline.
|
|
800
|
+
</li>
|
|
801
|
+
|
|
802
|
+
<li>
|
|
803
|
+
The <code>~</code> character creates subscript when used <strong>within a word/identifier</strong> with paired tildes (e.g., <code>H~2~O</code>). The subscript ends at the second tilde.
|
|
804
|
+
</li>
|
|
805
|
+
|
|
806
|
+
<li>
|
|
807
|
+
When tildes are at word boundaries (e.g., <code>~text~</code>), they create underline instead of subscript. This prevents interference with underline/strikethrough syntax.
|
|
808
|
+
</li>
|
|
809
|
+
|
|
810
|
+
</ul>
|
|
811
|
+
|
|
812
|
+
<p>
|
|
813
|
+
<strong> Examples:</strong>
|
|
814
|
+
</p>
|
|
815
|
+
|
|
816
|
+
<pre><code class="highlight language-markdown">Water: H~2~O # H₂O (subscript - tildes within word)
|
|
817
|
+
Area: m^2 # m² (superscript)
|
|
818
|
+
Formula: E = mc^2 # E = mc² (superscript)
|
|
819
|
+
Chemical: H~2~SO~4~ # H₂SO₄ (multiple subscripts within word)
|
|
820
|
+
~h2o~ # <span class="nt"><u></span>h2o<span class="nt"></u></span> (underline - tildes at word boundaries)
|
|
821
|
+
</code></pre>
|
|
822
|
+
|
|
823
|
+
<p>
|
|
824
|
+
This feature is enabled by default in <strong>MultiMarkdown</strong> and <strong>unified</strong> modes. In other modes, use the <code>--sup-sub</code> flag to enable it. Use <code>--no-sup-sub</code> to disable it in unified or MultiMarkdown modes.
|
|
825
|
+
</p>
|
|
826
|
+
|
|
827
|
+
<h3 id="lists">
|
|
828
|
+
Lists
|
|
829
|
+
</h3>
|
|
830
|
+
|
|
831
|
+
<p>
|
|
832
|
+
<strong> Unordered:</strong>
|
|
833
|
+
</p>
|
|
834
|
+
|
|
835
|
+
<pre><code class="highlight language-markdown"><span class="p">-</span> Item 1
|
|
836
|
+
<span class="p">-</span> Item 2
|
|
837
|
+
<span class="p"> -</span> Nested item
|
|
838
|
+
<span class="p"> -</span> Another nested
|
|
839
|
+
<span class="p">-</span> Item 3
|
|
840
|
+
</code></pre>
|
|
841
|
+
|
|
842
|
+
<p>
|
|
843
|
+
<strong> Ordered:</strong>
|
|
844
|
+
</p>
|
|
845
|
+
|
|
846
|
+
<pre><code class="highlight language-markdown"><span class="p">1.</span> First item
|
|
847
|
+
<span class="p">2.</span> Second item
|
|
848
|
+
<span class="p"> 1.</span> Nested item
|
|
849
|
+
<span class="p"> 2.</span> Another nested
|
|
850
|
+
<span class="p">3.</span> Third item
|
|
851
|
+
</code></pre>
|
|
852
|
+
|
|
853
|
+
<p>
|
|
854
|
+
<strong> Mixed Markers (Unified & MultiMarkdown modes):</strong>
|
|
855
|
+
In unified and MultiMarkdown modes, you can mix different list marker types at the same indentation level. The list will inherit the type from the first item:
|
|
856
|
+
</p>
|
|
857
|
+
|
|
858
|
+
<pre><code class="highlight language-markdown"><span class="p">1.</span> First numbered item
|
|
859
|
+
<span class="p">*</span> Second item (becomes numbered)
|
|
860
|
+
<span class="p">*</span> Third item (becomes numbered)
|
|
861
|
+
<span class="p">
|
|
862
|
+
*</span> First bullet item
|
|
863
|
+
<span class="p">1.</span> Second item (becomes bullet)
|
|
864
|
+
<span class="p">2.</span> Third item (becomes bullet)
|
|
865
|
+
</code></pre>
|
|
866
|
+
|
|
867
|
+
<p>
|
|
868
|
+
By default, CommonMark and GFM modes create separate lists when marker types change. Use <code>--mixed-lists</code> to enable this behavior in other modes, or <code>--no-mixed-lists</code> to disable it in unified/MultiMarkdown modes.
|
|
869
|
+
</p>
|
|
870
|
+
|
|
871
|
+
<p>
|
|
872
|
+
<strong> Alpha Lists (Unified mode):</strong>
|
|
873
|
+
In unified mode, you can use alphabetic markers for ordered lists:
|
|
874
|
+
</p>
|
|
875
|
+
|
|
876
|
+
<pre><code class="highlight language-markdown">[apex-alpha-list:lower]
|
|
877
|
+
<span class="p">
|
|
878
|
+
1.</span> First item
|
|
879
|
+
<span class="p">2.</span> Second item
|
|
880
|
+
<span class="p">3.</span> Third item
|
|
881
|
+
|
|
882
|
+
[apex-alpha-list:upper]
|
|
883
|
+
<span class="p">
|
|
884
|
+
1.</span> First item (uppercase)
|
|
885
|
+
<span class="p">2.</span> Second item (uppercase)
|
|
886
|
+
<span class="p">3.</span> Third item (uppercase)
|
|
887
|
+
</code></pre>
|
|
888
|
+
|
|
889
|
+
<p>
|
|
890
|
+
Alpha lists are automatically converted to <abbr title="Hypertext Markup Language">HTML</abbr> with <code>style="list-style-type: lower-alpha"</code> or <code>style="list-style-type: upper-alpha"</code>. This feature is enabled by default in unified mode. Use <code>--alpha-lists</code> to enable in other modes, or <code>--no-alpha-lists</code> to disable in unified mode.
|
|
891
|
+
</p>
|
|
892
|
+
|
|
893
|
+
<p>
|
|
894
|
+
<strong> Task Lists:</strong>
|
|
895
|
+
</p>
|
|
896
|
+
|
|
897
|
+
<pre><code class="highlight language-markdown"><span class="p">-</span> [ ] Todo item
|
|
898
|
+
<span class="p">-</span> [x] Completed item
|
|
899
|
+
<span class="p">-</span> [ ] Another todo
|
|
900
|
+
</code></pre>
|
|
901
|
+
|
|
902
|
+
<h3 id="links-and-images">
|
|
903
|
+
Links and Images
|
|
904
|
+
</h3>
|
|
905
|
+
|
|
906
|
+
<p>
|
|
907
|
+
<strong> Standard Markdown links:</strong>
|
|
908
|
+
</p>
|
|
909
|
+
|
|
910
|
+
<pre><code class="highlight language-markdown"><span class="p">[</span><span class="nv">Link text</span><span class="p">](</span><span class="sx">https://example.com</span><span class="p">)</span>
|
|
911
|
+
<span class="p">[</span><span class="nv">Link with title</span><span class="p">](</span><span class="sx">https://example.com</span> <span class="nn">"Title"</span><span class="p">)</span>
|
|
912
|
+
</code></pre>
|
|
913
|
+
|
|
914
|
+
<p>
|
|
915
|
+
<strong> Link titles with different quote styles (<abbr title="MultiMarkdown">MMD</abbr> 6):</strong>
|
|
916
|
+
Link and image titles can use single quotes, double quotes, or parentheses. This is supported in <strong>unified</strong> and <strong>MultiMarkdown</strong> modes:
|
|
917
|
+
</p>
|
|
918
|
+
|
|
919
|
+
<pre><code class="highlight language-markdown"><span class="p">[</span><span class="nv">Link with double quotes</span><span class="p">](</span><span class="sx">https://example.com</span> <span class="nn">"Title"</span><span class="p">)</span>
|
|
920
|
+
<span class="p">[</span><span class="nv">Link with single quotes</span><span class="p">](</span><span class="sx">https://example.com</span> <span class="nn">'Title'</span><span class="p">)</span>
|
|
921
|
+
<span class="p">[</span><span class="nv">Link with parentheses</span><span class="p">](</span><span class="sx">https://example.com</span> <span class="nn">(Title)</span><span class="p">)</span>
|
|
922
|
+
</code></pre>
|
|
923
|
+
|
|
924
|
+
<p>
|
|
925
|
+
<strong> Images:</strong>
|
|
926
|
+
</p>
|
|
927
|
+
|
|
928
|
+
<pre><code class="highlight language-markdown"><span class="p"></span>
|
|
929
|
+
<span class="p"></span>
|
|
930
|
+
</code></pre>
|
|
931
|
+
|
|
932
|
+
<p>
|
|
933
|
+
<strong> Image titles with different quote styles (<abbr title="MultiMarkdown">MMD</abbr> 6):</strong>
|
|
934
|
+
</p>
|
|
935
|
+
|
|
936
|
+
<pre><code class="highlight language-markdown"><span class="p"></span>
|
|
937
|
+
<span class="p"></span>
|
|
938
|
+
<span class="p"></span><span class="p">)</span>
|
|
939
|
+
</code></pre>
|
|
940
|
+
|
|
941
|
+
<p>
|
|
942
|
+
<strong> Reference-style links and images:</strong>
|
|
943
|
+
Reference-style links and images also support all three quote styles for titles:
|
|
944
|
+
</p>
|
|
945
|
+
|
|
946
|
+
<pre><code class="highlight language-markdown"><span class="p">[</span><span class="nv">Link text</span><span class="p">][</span><span class="ss">ref1</span><span class="p">]</span>
|
|
947
|
+
<span class="p">![</span><span class="nv">Image</span><span class="p">][</span><span class="ss">img1</span><span class="p">]</span>
|
|
948
|
+
|
|
949
|
+
<span class="p">[</span><span class="ss">ref1</span><span class="p">]:</span> <span class="sx">https://example.com</span> <span class="nn">"Reference title"</span>
|
|
950
|
+
<span class="p">[</span><span class="ss">ref2</span><span class="p">]:</span> <span class="sx">https://example.com</span> <span class="nn">'Reference title'</span>
|
|
951
|
+
<span class="p">[</span><span class="ss">ref3</span><span class="p">]:</span> <span class="sx">https://example.com</span> <span class="nn">(Reference title)</span>
|
|
952
|
+
|
|
953
|
+
<span class="p">[</span><span class="ss">img1</span><span class="p">]:</span> <span class="sx">image.png</span> <span class="nn">"Image title"</span>
|
|
954
|
+
<span class="p">[</span><span class="ss">img2</span><span class="p">]:</span> <span class="sx">image.png</span> <span class="nn">'Image title'</span>
|
|
955
|
+
<span class="p">[</span><span class="ss">img3</span><span class="p">]:</span> <span class="sx">image.png</span> <span class="nn">(Image title)</span>
|
|
956
|
+
</code></pre>
|
|
957
|
+
|
|
958
|
+
<p>
|
|
959
|
+
<strong> Autolinks:</strong>
|
|
960
|
+
</p>
|
|
961
|
+
|
|
962
|
+
<p>
|
|
963
|
+
Apex can automatically convert URLs and email addresses into clickable links. Autolinking is enabled by default in <strong>GFM</strong>, <strong>MultiMarkdown</strong>, <strong>Kramdown</strong>, and <strong>unified</strong> modes. It is disabled by default in <strong>CommonMark</strong> mode.
|
|
964
|
+
</p>
|
|
965
|
+
|
|
966
|
+
<p>
|
|
967
|
+
<strong> Angle-bracket autolinks:</strong>
|
|
968
|
+
</p>
|
|
969
|
+
|
|
970
|
+
<pre><code class="highlight language-markdown"><span class="nv"><https://example.com></span>
|
|
971
|
+
<span class="nv"><http://example.com></span>
|
|
972
|
+
<span class="nv"><mailto:user@example.com></span>
|
|
973
|
+
</code></pre>
|
|
974
|
+
|
|
975
|
+
<p>
|
|
976
|
+
<strong> Bare URL autolinks:</strong>
|
|
977
|
+
</p>
|
|
978
|
+
|
|
979
|
+
<pre><code class="highlight language-markdown">Visit https://example.com for more info.
|
|
980
|
+
Check out http://example.com too.
|
|
981
|
+
</code></pre>
|
|
982
|
+
|
|
983
|
+
<p>
|
|
984
|
+
<strong> Email autolinks:</strong>
|
|
985
|
+
</p>
|
|
986
|
+
|
|
987
|
+
<pre><code class="highlight language-markdown">Contact me@example.com for details.
|
|
988
|
+
Send to user@example.com.
|
|
989
|
+
</code></pre>
|
|
990
|
+
|
|
991
|
+
<p>
|
|
992
|
+
<strong> Important notes:</strong>
|
|
993
|
+
</p>
|
|
994
|
+
|
|
995
|
+
<ul>
|
|
996
|
+
|
|
997
|
+
<li>
|
|
998
|
+
Autolinks are <strong>not</strong> processed inside code spans (<code>`code`</code>) or code blocks (<code> </code> ```)
|
|
999
|
+
</li>
|
|
1000
|
+
|
|
1001
|
+
<li>
|
|
1002
|
+
Use <code>--autolink</code> to enable autolinking in modes where it’s disabled by default
|
|
1003
|
+
</li>
|
|
1004
|
+
|
|
1005
|
+
<li>
|
|
1006
|
+
Use <code>--no-autolink</code> to disable autolinking in modes where it’s enabled by default
|
|
1007
|
+
</li>
|
|
1008
|
+
|
|
1009
|
+
<li>
|
|
1010
|
+
Angle-bracket autolinks (<code><url></code>) are converted to standard Markdown links during preprocessing
|
|
1011
|
+
</li>
|
|
1012
|
+
|
|
1013
|
+
<li>
|
|
1014
|
+
Bare URLs and email addresses are also converted to Markdown links during preprocessing
|
|
1015
|
+
</li>
|
|
1016
|
+
|
|
1017
|
+
</ul>
|
|
1018
|
+
|
|
1019
|
+
<h3 id="code">
|
|
1020
|
+
Code
|
|
1021
|
+
</h3>
|
|
1022
|
+
|
|
1023
|
+
<p>
|
|
1024
|
+
<strong> Inline code:</strong>
|
|
1025
|
+
</p>
|
|
1026
|
+
|
|
1027
|
+
<pre><code class="highlight language-markdown">Use <span class="sb">`code`</span> in text.
|
|
1028
|
+
</code></pre>
|
|
1029
|
+
|
|
1030
|
+
<p>
|
|
1031
|
+
<strong> Fenced code blocks:</strong>
|
|
1032
|
+
</p>
|
|
1033
|
+
|
|
1034
|
+
<pre><code class="highlight language-markdown"><span class="p">```</span><span class="nl">python
|
|
1035
|
+
</span><span class="k">def</span> <span class="nf">hello</span><span class="p">():</span>
|
|
1036
|
+
<span class="nf">print</span><span class="p">(</span><span class="sh">"</span><span class="s">Hello, World!</span><span class="sh">"</span><span class="p">)</span>
|
|
1037
|
+
<span class="p">```</span>
|
|
1038
|
+
</code></pre>
|
|
1039
|
+
|
|
1040
|
+
<p>
|
|
1041
|
+
<strong> Indented code blocks:</strong>
|
|
1042
|
+
</p>
|
|
1043
|
+
|
|
1044
|
+
<pre><code class="highlight language-markdown"> def hello():
|
|
1045
|
+
print("Hello, World!")
|
|
1046
|
+
</code></pre>
|
|
1047
|
+
|
|
1048
|
+
<h3 id="blockquotes">
|
|
1049
|
+
Blockquotes
|
|
1050
|
+
</h3>
|
|
1051
|
+
|
|
1052
|
+
<pre><code class="highlight language-markdown"><span class="gt">> This is a quote.</span>
|
|
1053
|
+
<span class="gt">> It can span multiple lines.</span>
|
|
1054
|
+
<span class="gt">></span>
|
|
1055
|
+
<span class="gt">> > Nested quotes are supported.</span>
|
|
1056
|
+
</code></pre>
|
|
1057
|
+
|
|
1058
|
+
<p>
|
|
1059
|
+
<strong> Lists and definition lists in blockquotes:</strong>
|
|
1060
|
+
</p>
|
|
1061
|
+
|
|
1062
|
+
<p>
|
|
1063
|
+
Blockquotes can contain lists and definition lists:
|
|
1064
|
+
</p>
|
|
1065
|
+
|
|
1066
|
+
<pre><code class="highlight language-markdown"><span class="gt">> 1. First item</span>
|
|
1067
|
+
<span class="gt">> 2. Second item</span>
|
|
1068
|
+
<span class="gt">></span>
|
|
1069
|
+
<span class="gt">> - Unordered item</span>
|
|
1070
|
+
<span class="gt">> - Another item</span>
|
|
1071
|
+
<span class="gt">></span>
|
|
1072
|
+
<span class="gt">> Term</span>
|
|
1073
|
+
<span class="gt">> : Definition</span>
|
|
1074
|
+
</code></pre>
|
|
1075
|
+
|
|
1076
|
+
<p>
|
|
1077
|
+
Nested blockquotes also support these features:
|
|
1078
|
+
</p>
|
|
1079
|
+
|
|
1080
|
+
<pre><code class="highlight language-markdown"><span class="gt">> > Nested quote</span>
|
|
1081
|
+
<span class="gt">> > 1. List item</span>
|
|
1082
|
+
<span class="gt">> > Term</span>
|
|
1083
|
+
<span class="gt">> > : Definition</span>
|
|
1084
|
+
</code></pre>
|
|
1085
|
+
|
|
1086
|
+
<h3 id="horizontal-rules">
|
|
1087
|
+
Horizontal Rules
|
|
1088
|
+
</h3>
|
|
1089
|
+
|
|
1090
|
+
<pre><code class="highlight language-markdown"><span class="p">---</span>
|
|
1091
|
+
<span class="p">***</span>
|
|
1092
|
+
<span class="ge">__</span>_
|
|
1093
|
+
</code></pre>
|
|
1094
|
+
|
|
1095
|
+
<h2 id="tables">
|
|
1096
|
+
Tables
|
|
1097
|
+
</h2>
|
|
1098
|
+
|
|
1099
|
+
<h3 id="standard-tables">
|
|
1100
|
+
Standard Tables
|
|
1101
|
+
</h3>
|
|
1102
|
+
|
|
1103
|
+
<pre><code class="highlight language-markdown">| Header 1 | Header 2 | Header 3 |
|
|
1104
|
+
| -------- | :------: | -------: |
|
|
1105
|
+
| Left | Center | Right |
|
|
1106
|
+
| --- | --- | --- |
|
|
1107
|
+
| Data | Data | Data |
|
|
1108
|
+
</code></pre>
|
|
1109
|
+
|
|
1110
|
+
<p>
|
|
1111
|
+
Column alignment:
|
|
1112
|
+
</p>
|
|
1113
|
+
|
|
1114
|
+
<ul>
|
|
1115
|
+
|
|
1116
|
+
<li>
|
|
1117
|
+
<code>:---</code> or <code>---</code> - Left (default)
|
|
1118
|
+
</li>
|
|
1119
|
+
|
|
1120
|
+
<li>
|
|
1121
|
+
<code>:---:</code> - Center
|
|
1122
|
+
</li>
|
|
1123
|
+
|
|
1124
|
+
<li>
|
|
1125
|
+
<code>---:</code> - Right
|
|
1126
|
+
</li>
|
|
1127
|
+
|
|
1128
|
+
</ul>
|
|
1129
|
+
|
|
1130
|
+
<h3 id="relaxed-tables">
|
|
1131
|
+
Relaxed Tables
|
|
1132
|
+
</h3>
|
|
1133
|
+
|
|
1134
|
+
<p>
|
|
1135
|
+
In unified and kramdown modes, tables don’t require separator rows:
|
|
1136
|
+
</p>
|
|
1137
|
+
|
|
1138
|
+
<pre><code class="highlight language-markdown">one | two | three
|
|
1139
|
+
---|---|---|
|
|
1140
|
+
1 | 2 | 3
|
|
1141
|
+
4 | 5 | 6
|
|
1142
|
+
</code></pre>
|
|
1143
|
+
|
|
1144
|
+
<p>
|
|
1145
|
+
This automatically becomes a table. See <a href="Modes.html">Modes</a> for details.
|
|
1146
|
+
</p>
|
|
1147
|
+
|
|
1148
|
+
<h3 id="headerless-tables">
|
|
1149
|
+
Headerless Tables
|
|
1150
|
+
</h3>
|
|
1151
|
+
|
|
1152
|
+
<p>
|
|
1153
|
+
Apex supports tables that start with alignment rows (separator rows) without header rows. The alignment specified in the separator row is automatically applied to all columns:
|
|
1154
|
+
</p>
|
|
1155
|
+
|
|
1156
|
+
<pre><code class="highlight language-markdown">| | | |
|
|
1157
|
+
| --- | --- | --- |
|
|
1158
|
+
| a | b | c |
|
|
1159
|
+
| --- | --- | --- |
|
|
1160
|
+
| 1 | 2 | 3 |
|
|
1161
|
+
</code></pre>
|
|
1162
|
+
|
|
1163
|
+
<p>
|
|
1164
|
+
Alignment specifiers work as usual:
|
|
1165
|
+
</p>
|
|
1166
|
+
|
|
1167
|
+
<pre><code class="highlight language-markdown">| | | |
|
|
1168
|
+
|:---|:---:|---:|
|
|
1169
|
+
| left | center | right |
|
|
1170
|
+
</code></pre>
|
|
1171
|
+
|
|
1172
|
+
<p>
|
|
1173
|
+
In this case, the first row (the alignment row) specifies the column alignment, and all subsequent data rows inherit that alignment. The empty header row that would normally be required is automatically handled.
|
|
1174
|
+
</p>
|
|
1175
|
+
|
|
1176
|
+
<h4 id="row-header-columns">
|
|
1177
|
+
Row header columns
|
|
1178
|
+
</h4>
|
|
1179
|
+
|
|
1180
|
+
<p>
|
|
1181
|
+
You can also mark the <strong>first column</strong> as a row-header column by starting the header row with an <strong>empty first cell</strong>:
|
|
1182
|
+
</p>
|
|
1183
|
+
|
|
1184
|
+
<pre><code class="highlight language-markdown">| | Header 1 | Header 2 |
|
|
1185
|
+
| --- | --- | --- |
|
|
1186
|
+
| Row 1 | data 1.1 | data 1.2 |
|
|
1187
|
+
| Row 2 | data 2.1 | data 2.2 |
|
|
1188
|
+
</code></pre>
|
|
1189
|
+
|
|
1190
|
+
<p>
|
|
1191
|
+
When the first header cell is empty (for example, <code>| |</code> or <code>| |</code>), Apex will:
|
|
1192
|
+
</p>
|
|
1193
|
+
|
|
1194
|
+
<ul>
|
|
1195
|
+
|
|
1196
|
+
<li>
|
|
1197
|
+
Treat the rest of the header row as usual column headers.
|
|
1198
|
+
</li>
|
|
1199
|
+
|
|
1200
|
+
<li>
|
|
1201
|
+
Render the first cell of each body row as a <strong>row header</strong> using <code><th scope="row">Row 1</th></code>, <code><th scope="row">Row 2</th></code>, etc.
|
|
1202
|
+
</li>
|
|
1203
|
+
|
|
1204
|
+
</ul>
|
|
1205
|
+
|
|
1206
|
+
<p>
|
|
1207
|
+
Notes:
|
|
1208
|
+
</p>
|
|
1209
|
+
|
|
1210
|
+
<ul>
|
|
1211
|
+
|
|
1212
|
+
<li>
|
|
1213
|
+
The row-header behavior only applies to the <strong>first column</strong> and only when the <strong>first header cell is empty</strong>.
|
|
1214
|
+
</li>
|
|
1215
|
+
|
|
1216
|
+
<li>
|
|
1217
|
+
Tables that start with <code>|data|data|</code> or <code>data|data</code> do <strong>not</strong> enable row headers.
|
|
1218
|
+
</li>
|
|
1219
|
+
|
|
1220
|
+
<li>
|
|
1221
|
+
This works together with all other table features (relaxed tables, headerless tables, colspans/rowspans, captions, etc.).
|
|
1222
|
+
</li>
|
|
1223
|
+
|
|
1224
|
+
</ul>
|
|
1225
|
+
|
|
1226
|
+
<h3 id="inline-tables-from-csvtsv">
|
|
1227
|
+
Inline Tables from CSV/TSV
|
|
1228
|
+
</h3>
|
|
1229
|
+
|
|
1230
|
+
<p>
|
|
1231
|
+
In addition to regular pipe tables, Apex can convert inline CSV/TSV text into tables.
|
|
1232
|
+
</p>
|
|
1233
|
+
|
|
1234
|
+
<h4 id="fenced-csvtsv-tables">
|
|
1235
|
+
Fenced CSV/TSV tables
|
|
1236
|
+
</h4>
|
|
1237
|
+
|
|
1238
|
+
<p>
|
|
1239
|
+
Use a fenced code block with the info string <code>table</code>. The delimiter is detected automatically:
|
|
1240
|
+
</p>
|
|
1241
|
+
|
|
1242
|
+
<ul>
|
|
1243
|
+
|
|
1244
|
+
<li>
|
|
1245
|
+
If any non-blank line contains a <strong>tab</strong>, the block is treated as TSV.
|
|
1246
|
+
</li>
|
|
1247
|
+
|
|
1248
|
+
<li>
|
|
1249
|
+
Otherwise, if any non-blank line contains a <strong>comma</strong>, the block is treated as CSV.
|
|
1250
|
+
</li>
|
|
1251
|
+
|
|
1252
|
+
<li>
|
|
1253
|
+
If no tabs or commas are found, the block is left unchanged as a normal <code>table</code>-info code block (useful for showing literal CSV/TSV).
|
|
1254
|
+
</li>
|
|
1255
|
+
|
|
1256
|
+
</ul>
|
|
1257
|
+
|
|
1258
|
+
<pre><code class="highlight language-table">header 1,header 2,header 3
|
|
1259
|
+
data 1,data 2,data 3
|
|
1260
|
+
,,data 2c
|
|
1261
|
+
</code></pre>
|
|
1262
|
+
|
|
1263
|
+
<p>
|
|
1264
|
+
You can also use TSV with real tab characters:
|
|
1265
|
+
</p>
|
|
1266
|
+
|
|
1267
|
+
<pre><code class="highlight language-table">col1\tcol2\tcol3
|
|
1268
|
+
val1\tval2\tval3
|
|
1269
|
+
</code></pre>
|
|
1270
|
+
|
|
1271
|
+
<h4 id="alignment-rows-in-csvtsv-tables">
|
|
1272
|
+
Alignment rows in CSV/TSV tables
|
|
1273
|
+
</h4>
|
|
1274
|
+
|
|
1275
|
+
<p>
|
|
1276
|
+
CSV/TSV inline tables can specify column alignment using a row of <strong>alignment keywords</strong>:
|
|
1277
|
+
</p>
|
|
1278
|
+
|
|
1279
|
+
<pre><code class="highlight language-table">H1,H2,H3
|
|
1280
|
+
left,center,right
|
|
1281
|
+
a,b,c
|
|
1282
|
+
</code></pre>
|
|
1283
|
+
|
|
1284
|
+
<p>
|
|
1285
|
+
The alignment row is not rendered as data; it is converted to the equivalent Markdown alignment row:
|
|
1286
|
+
</p>
|
|
1287
|
+
|
|
1288
|
+
<ul>
|
|
1289
|
+
|
|
1290
|
+
<li>
|
|
1291
|
+
<code>left</code> → <code>:---</code>
|
|
1292
|
+
</li>
|
|
1293
|
+
|
|
1294
|
+
<li>
|
|
1295
|
+
<code>center</code> → <code>:---:</code>
|
|
1296
|
+
</li>
|
|
1297
|
+
|
|
1298
|
+
<li>
|
|
1299
|
+
<code>right</code> → <code>---:</code>
|
|
1300
|
+
</li>
|
|
1301
|
+
|
|
1302
|
+
<li>
|
|
1303
|
+
<code>auto</code> → <code>---</code>
|
|
1304
|
+
</li>
|
|
1305
|
+
|
|
1306
|
+
</ul>
|
|
1307
|
+
|
|
1308
|
+
<p>
|
|
1309
|
+
If the first row contains only alignment keywords, it becomes a <strong>headless table</strong>: the alignment row is emitted first and all following rows become body rows. If there is <strong>no alignment row at all</strong>, Apex emits a default <code>---</code> separator row so that relaxed/headless table handling still works as expected.
|
|
1310
|
+
</p>
|
|
1311
|
+
|
|
1312
|
+
<h4 id="table-markers">
|
|
1313
|
+
<code><!--TABLE--></code> markers
|
|
1314
|
+
</h4>
|
|
1315
|
+
|
|
1316
|
+
<p>
|
|
1317
|
+
You can also start an inline CSV/TSV table with an <abbr title="Hypertext Markup Language">HTML</abbr> comment:
|
|
1318
|
+
</p>
|
|
1319
|
+
|
|
1320
|
+
<pre><code class="highlight language-markdown">| header 1 | header 2 | header 3 |
|
|
1321
|
+
| --- | --- | --- |
|
|
1322
|
+
| data 1 | data 2 | data 3 |
|
|
1323
|
+
| --- | --- | --- |
|
|
1324
|
+
| | | data 2c |
|
|
1325
|
+
| <span class="sb">``` | | |
|
|
1326
|
+
|
|
1327
|
+
`| ` consumes the following **contiguous non-blank lines** as table data (stopping at the first blank line) | applies the same delimiter detection and optional alignment-row handling | and converts the block into a table. If no tabs or commas are found | the comment and lines are left unchanged. |
|
|
1328
|
+
| --- | --- | --- | --- |
|
|
1329
|
+
|
|
1330
|
+
### Advanced Table Features
|
|
1331
|
+
|
|
1332
|
+
**Column spans (empty cells):**
|
|
1333
|
+
```</span>markdown
|
|
1334
|
+
| A | B | C |
|
|
1335
|
+
| --- | --- | --- |
|
|
1336
|
+
| D | | |
|
|
1337
|
+
</code></pre>
|
|
1338
|
+
|
|
1339
|
+
<p>
|
|
1340
|
+
Empty cells merge with the previous cell.
|
|
1341
|
+
</p>
|
|
1342
|
+
|
|
1343
|
+
<p>
|
|
1344
|
+
<strong> Row spans:</strong>
|
|
1345
|
+
</p>
|
|
1346
|
+
|
|
1347
|
+
<pre><code class="highlight language-markdown">| A | B |
|
|
1348
|
+
| --- | --- |
|
|
1349
|
+
| C | D |
|
|
1350
|
+
| --- | --- |
|
|
1351
|
+
| ^^ | E |
|
|
1352
|
+
</code></pre>
|
|
1353
|
+
|
|
1354
|
+
<p>
|
|
1355
|
+
The <code>^^</code> marker creates a row span on the cell above. Consecutive <code>^^</code> markers stack to create larger row spans.
|
|
1356
|
+
</p>
|
|
1357
|
+
|
|
1358
|
+
<p>
|
|
1359
|
+
<strong> Table footers (tfoot):</strong>
|
|
1360
|
+
</p>
|
|
1361
|
+
|
|
1362
|
+
<pre><code class="highlight language-markdown">| h1 | h2 | h3 |
|
|
1363
|
+
| --- | :---: | --- |
|
|
1364
|
+
| d1 | d2 | d3 |
|
|
1365
|
+
| --- | --- | --- |
|
|
1366
|
+
| d1 | d2 | d3 |
|
|
1367
|
+
| === | === | === |
|
|
1368
|
+
| d-4 | d-5 | d-6 |
|
|
1369
|
+
</code></pre>
|
|
1370
|
+
|
|
1371
|
+
<p>
|
|
1372
|
+
A row where every cell contains only <code>===</code> (three or more equals, with optional extra <code>=</code> and whitespace) is treated as a <strong>footer divider</strong>. That row is removed from the output and all following rows are rendered inside <code><tfoot></code>.
|
|
1373
|
+
</p>
|
|
1374
|
+
|
|
1375
|
+
<p>
|
|
1376
|
+
<strong> Individual cell alignment:</strong>
|
|
1377
|
+
</p>
|
|
1378
|
+
|
|
1379
|
+
<p>
|
|
1380
|
+
Table cells can be aligned individually using colons, similar to Jekyll Spaceship:
|
|
1381
|
+
</p>
|
|
1382
|
+
|
|
1383
|
+
<pre><code class="highlight language-markdown">| Header | Header | Header |
|
|
1384
|
+
| --- | --- | --- |
|
|
1385
|
+
| :Left | Center: | ♋ |
|
|
1386
|
+
| --- | --- | --- |
|
|
1387
|
+
| Right: | Normal | :Left |
|
|
1388
|
+
</code></pre>
|
|
1389
|
+
|
|
1390
|
+
<ul>
|
|
1391
|
+
|
|
1392
|
+
<li>
|
|
1393
|
+
<code>:Text</code> or <code>: Text</code> - Left align (leading colon)
|
|
1394
|
+
</li>
|
|
1395
|
+
|
|
1396
|
+
<li>
|
|
1397
|
+
<code>Text:</code> or <code>Text :</code> - Right align (trailing colon)
|
|
1398
|
+
</li>
|
|
1399
|
+
|
|
1400
|
+
<li>
|
|
1401
|
+
<code>⛺</code> or <code>: Text :</code> - Center align (both colons)
|
|
1402
|
+
</li>
|
|
1403
|
+
|
|
1404
|
+
</ul>
|
|
1405
|
+
|
|
1406
|
+
<p>
|
|
1407
|
+
The colons are removed from the output, and the alignment is applied via <abbr title="Cascading Style Sheets">CSS</abbr> <code>text-align</code> styles. Escaped colons (<code>\:</code>) are not treated as alignment markers.
|
|
1408
|
+
</p>
|
|
1409
|
+
|
|
1410
|
+
<p>
|
|
1411
|
+
<strong> Combined row and column spans:</strong>
|
|
1412
|
+
</p>
|
|
1413
|
+
|
|
1414
|
+
<p>
|
|
1415
|
+
You can mix rowspans and colspans in the same table to create more complex layouts:
|
|
1416
|
+
</p>
|
|
1417
|
+
|
|
1418
|
+
<pre><code class="highlight language-markdown">[Employee Performance Q4]
|
|
1419
|
+
| Department | Employee | Q1-Q2 Average | Q3 | Q4 | Overall |
|
|
1420
|
+
| ----------- | -------- | ------------- | ------ | --- | ------- |
|
|
1421
|
+
| Engineering | Alice | 93.5 | 94 | 96 | 94.25 |
|
|
1422
|
+
| --- | --- | --- | --- | --- | --- |
|
|
1423
|
+
| ^^ | Bob | 89.0 | 87 | 91 | 89.00 |
|
|
1424
|
+
| Marketing | Charlie | 92.0 | Absent | | 92.00 |
|
|
1425
|
+
| Sales | Diana | 87.5 | 88 | 90 | 88.50 |
|
|
1426
|
+
| ^^ | Eve | 93.0 | 95 | 93 | 93.50 |
|
|
1427
|
+
|
|
1428
|
+
{: .performance-table #q4-results}
|
|
1429
|
+
</code></pre>
|
|
1430
|
+
|
|
1431
|
+
<p>
|
|
1432
|
+
Here <code>^^</code> creates rowspans for the <code>Department</code> column, while empty cells in the “Absent” row allow the “Q4” value to span visually.
|
|
1433
|
+
</p>
|
|
1434
|
+
|
|
1435
|
+
<p>
|
|
1436
|
+
<strong> Table captions:</strong>
|
|
1437
|
+
</p>
|
|
1438
|
+
|
|
1439
|
+
<pre><code class="highlight language-markdown">[Table Caption]
|
|
1440
|
+
|
|
1441
|
+
| A | B |
|
|
1442
|
+
| --- | --- |
|
|
1443
|
+
| C | D |
|
|
1444
|
+
</code></pre>
|
|
1445
|
+
|
|
1446
|
+
<p>
|
|
1447
|
+
Captions can appear <strong>before or after</strong> a table. They must be contiguous with the table (no other content between them), but a blank line is allowed:
|
|
1448
|
+
</p>
|
|
1449
|
+
|
|
1450
|
+
<pre><code class="highlight language-markdown">| A | B |
|
|
1451
|
+
| --- | --- |
|
|
1452
|
+
|
|
1453
|
+
| C | D |
|
|
1454
|
+
|
|
1455
|
+
[Caption after table]
|
|
1456
|
+
</code></pre>
|
|
1457
|
+
|
|
1458
|
+
<p>
|
|
1459
|
+
In addition, Apex supports <strong>Pandoc-style captions</strong>:
|
|
1460
|
+
</p>
|
|
1461
|
+
|
|
1462
|
+
<pre><code class="highlight language-markdown">| A | B |
|
|
1463
|
+
| --- | --- |
|
|
1464
|
+
|
|
1465
|
+
| C | D |
|
|
1466
|
+
|
|
1467
|
+
[Caption after table]
|
|
1468
|
+
</code></pre>
|
|
1469
|
+
|
|
1470
|
+
<p>
|
|
1471
|
+
Pandoc-style <code>Table: Caption</code> lines are normalized to <code>[Caption]</code> before parsing, so they work with the same caption rendering as MultiMarkdown captions.
|
|
1472
|
+
</p>
|
|
1473
|
+
|
|
1474
|
+
<p>
|
|
1475
|
+
Apex also supports <strong>Pandoc table_attributes extension</strong> using the <code>: Caption</code> syntax:
|
|
1476
|
+
</p>
|
|
1477
|
+
|
|
1478
|
+
<pre><code class="highlight language-markdown">| Key | Value |
|
|
1479
|
+
| --- | :---: |
|
|
1480
|
+
| one | 1 |
|
|
1481
|
+
| --- | --- |
|
|
1482
|
+
| two | 2 |
|
|
1483
|
+
|
|
1484
|
+
[Key value table] {#table-id .testing key="value"}
|
|
1485
|
+
</code></pre>
|
|
1486
|
+
|
|
1487
|
+
<p>
|
|
1488
|
+
The <code>: Caption</code> format (with optional IAL attributes) is recognized when it appears immediately before or after a table. IAL attributes in the caption are extracted and applied to the table element itself. This supports both Kramdown-style IALs (<code>{: #id .class}</code>) and Pandoc-style IALs without the colon (<code>{#id .class}</code>).
|
|
1489
|
+
</p>
|
|
1490
|
+
|
|
1491
|
+
<p>
|
|
1492
|
+
<strong> Note:</strong> The <code>: Caption</code> syntax only works when adjacent to a table to avoid conflicts with definition list syntax. If a line starting with <code>:</code> is not next to a table, it will be processed as a definition list item.
|
|
1493
|
+
</p>
|
|
1494
|
+
|
|
1495
|
+
<p>
|
|
1496
|
+
<strong> Caption position:</strong> By default, captions appear <strong>below</strong> the table. Use the <code>--captions above</code> option to place captions above the table instead. The <code>--captions below</code> option (or default) places them below. See <a href="Command-Line-Options.html">Command Line Options</a> for details.
|
|
1497
|
+
</p>
|
|
1498
|
+
|
|
1499
|
+
<h2 id="footnotes">
|
|
1500
|
+
Footnotes
|
|
1501
|
+
</h2>
|
|
1502
|
+
|
|
1503
|
+
<h3 id="reference-style">
|
|
1504
|
+
Reference Style
|
|
1505
|
+
</h3>
|
|
1506
|
+
|
|
1507
|
+
<pre><code class="highlight language-markdown">Here's a footnote[^1] and another[^note].
|
|
1508
|
+
|
|
1509
|
+
<span class="p">[</span><span class="ss">^1</span><span class="p">]:</span> <span class="sx">First</span> footnote content.
|
|
1510
|
+
<span class="p">[</span><span class="ss">^note</span><span class="p">]:</span> <span class="sx">Second</span> footnote with custom ID.
|
|
1511
|
+
</code></pre>
|
|
1512
|
+
|
|
1513
|
+
<h3 id="inline-style-kramdown">
|
|
1514
|
+
Inline Style (Kramdown)
|
|
1515
|
+
</h3>
|
|
1516
|
+
|
|
1517
|
+
<pre><code class="highlight language-markdown">This is a footnote[^fn1].
|
|
1518
|
+
</code></pre>
|
|
1519
|
+
|
|
1520
|
+
<h3 id="inline-style-multimarkdown">
|
|
1521
|
+
Inline Style (MultiMarkdown)
|
|
1522
|
+
</h3>
|
|
1523
|
+
|
|
1524
|
+
<pre><code class="highlight language-markdown">This is a footnote[^fn2].
|
|
1525
|
+
</code></pre>
|
|
1526
|
+
|
|
1527
|
+
<h2 id="definition-lists">
|
|
1528
|
+
Definition Lists
|
|
1529
|
+
</h2>
|
|
1530
|
+
|
|
1531
|
+
<pre><code class="highlight language-markdown">Term
|
|
1532
|
+
: Definition text with <span class="gs">**Markdown**</span> support
|
|
1533
|
+
|
|
1534
|
+
Apple
|
|
1535
|
+
: A fruit
|
|
1536
|
+
: A company
|
|
1537
|
+
|
|
1538
|
+
Term with multiple definitions
|
|
1539
|
+
: First definition
|
|
1540
|
+
: Second definition
|
|
1541
|
+
</code></pre>
|
|
1542
|
+
|
|
1543
|
+
<p>
|
|
1544
|
+
<strong> Definition lists in blockquotes:</strong>
|
|
1545
|
+
</p>
|
|
1546
|
+
|
|
1547
|
+
<p>
|
|
1548
|
+
Definition lists work inside blockquotes, including nested blockquotes:
|
|
1549
|
+
</p>
|
|
1550
|
+
|
|
1551
|
+
<pre><code class="highlight language-markdown"><span class="gt">> Term 1</span>
|
|
1552
|
+
<span class="gt">> : Definition 1</span>
|
|
1553
|
+
<span class="gt">> Term 2</span>
|
|
1554
|
+
<span class="gt">> : Definition 2</span>
|
|
1555
|
+
<span class="gt">
|
|
1556
|
+
> > Nested blockquote</span>
|
|
1557
|
+
<span class="gt">> > Term</span>
|
|
1558
|
+
<span class="gt">> > : Definition</span>
|
|
1559
|
+
</code></pre>
|
|
1560
|
+
|
|
1561
|
+
<p>
|
|
1562
|
+
This allows you to create quoted definitions and maintain proper nesting structure.
|
|
1563
|
+
</p>
|
|
1564
|
+
|
|
1565
|
+
<h2 id="citations">
|
|
1566
|
+
Citations
|
|
1567
|
+
</h2>
|
|
1568
|
+
|
|
1569
|
+
<p>
|
|
1570
|
+
<strong> Note:</strong> Citations are supported in <strong>MultiMarkdown</strong> and <strong>unified</strong> modes. A bibliography file must be provided via <code>--bibliography</code> flag or document metadata.
|
|
1571
|
+
</p>
|
|
1572
|
+
|
|
1573
|
+
<h3 id="pandoc-citation-syntax">
|
|
1574
|
+
Pandoc Citation Syntax
|
|
1575
|
+
</h3>
|
|
1576
|
+
|
|
1577
|
+
<p>
|
|
1578
|
+
<strong> Basic citation:</strong>
|
|
1579
|
+
</p>
|
|
1580
|
+
|
|
1581
|
+
<pre><code class="highlight language-markdown">See [@doe99] for details.
|
|
1582
|
+
</code></pre>
|
|
1583
|
+
|
|
1584
|
+
<p>
|
|
1585
|
+
<strong> Multiple citations:</strong>
|
|
1586
|
+
</p>
|
|
1587
|
+
|
|
1588
|
+
<pre><code class="highlight language-markdown">See [@doe99; @smith2000; @smith2004] for more information.
|
|
1589
|
+
</code></pre>
|
|
1590
|
+
|
|
1591
|
+
<p>
|
|
1592
|
+
<strong> Author in text:</strong>
|
|
1593
|
+
</p>
|
|
1594
|
+
|
|
1595
|
+
<pre><code class="highlight language-markdown">@smith04 says blah.
|
|
1596
|
+
</code></pre>
|
|
1597
|
+
|
|
1598
|
+
<p>
|
|
1599
|
+
<strong> Author suppressed:</strong>
|
|
1600
|
+
</p>
|
|
1601
|
+
|
|
1602
|
+
<pre><code class="highlight language-markdown">Smith says blah [-@smith04].
|
|
1603
|
+
</code></pre>
|
|
1604
|
+
|
|
1605
|
+
<p>
|
|
1606
|
+
<strong> With locator:</strong>
|
|
1607
|
+
</p>
|
|
1608
|
+
|
|
1609
|
+
<pre><code class="highlight language-markdown">@smith04 [p. 33] says blah.
|
|
1610
|
+
</code></pre>
|
|
1611
|
+
|
|
1612
|
+
<h3 id="multimarkdown-citation-syntax">
|
|
1613
|
+
MultiMarkdown Citation Syntax
|
|
1614
|
+
</h3>
|
|
1615
|
+
|
|
1616
|
+
<p>
|
|
1617
|
+
<strong> Basic citation:</strong>
|
|
1618
|
+
</p>
|
|
1619
|
+
|
|
1620
|
+
<pre><code class="highlight language-markdown">This is a statement[#Doe:2006].
|
|
1621
|
+
</code></pre>
|
|
1622
|
+
|
|
1623
|
+
<p>
|
|
1624
|
+
<strong> With locator:</strong>
|
|
1625
|
+
</p>
|
|
1626
|
+
|
|
1627
|
+
<pre><code class="highlight language-markdown">This is a statement<span class="p">[</span><span class="nv">p. 23</span><span class="p">][</span><span class="ss">#Doe:2006</span><span class="p">]</span>.
|
|
1628
|
+
</code></pre>
|
|
1629
|
+
|
|
1630
|
+
<p>
|
|
1631
|
+
<strong> Inline citation:</strong>
|
|
1632
|
+
</p>
|
|
1633
|
+
|
|
1634
|
+
<pre><code class="highlight language-markdown">As per Doe.[#John Doe. <span class="ge">*A Totally Fake Book 1*</span>. Vanity Press, 2006.]
|
|
1635
|
+
</code></pre>
|
|
1636
|
+
|
|
1637
|
+
<h3 id="mmark-citation-syntax">
|
|
1638
|
+
mmark Citation Syntax
|
|
1639
|
+
</h3>
|
|
1640
|
+
|
|
1641
|
+
<p>
|
|
1642
|
+
<strong> Basic citation:</strong>
|
|
1643
|
+
</p>
|
|
1644
|
+
|
|
1645
|
+
<pre><code class="highlight language-markdown">This references [@RFC2535].
|
|
1646
|
+
</code></pre>
|
|
1647
|
+
|
|
1648
|
+
<p>
|
|
1649
|
+
<strong> Normative citation:</strong>
|
|
1650
|
+
</p>
|
|
1651
|
+
|
|
1652
|
+
<pre><code class="highlight language-markdown">This references [@!RFC1034] (normative).
|
|
1653
|
+
</code></pre>
|
|
1654
|
+
|
|
1655
|
+
<p>
|
|
1656
|
+
<strong> Multiple citations:</strong>
|
|
1657
|
+
</p>
|
|
1658
|
+
|
|
1659
|
+
<pre><code class="highlight language-markdown">Multiple citations: [@RFC1034;@RFC1035].
|
|
1660
|
+
</code></pre>
|
|
1661
|
+
|
|
1662
|
+
<p>
|
|
1663
|
+
<strong> Combined reference:</strong>
|
|
1664
|
+
</p>
|
|
1665
|
+
|
|
1666
|
+
<pre><code class="highlight language-markdown">Combined reference: [@RFC1034@STD3].
|
|
1667
|
+
</code></pre>
|
|
1668
|
+
|
|
1669
|
+
<h3 id="bibliography">
|
|
1670
|
+
Bibliography
|
|
1671
|
+
</h3>
|
|
1672
|
+
|
|
1673
|
+
<p>
|
|
1674
|
+
Bibliography is automatically generated from cited entries and inserted at the <code><!-- REFERENCES --></code> marker or appended to the end of the document.
|
|
1675
|
+
</p>
|
|
1676
|
+
|
|
1677
|
+
<p>
|
|
1678
|
+
<strong> Bibliography marker:</strong>
|
|
1679
|
+
</p>
|
|
1680
|
+
|
|
1681
|
+
<pre><code class="highlight language-markdown"><span class="gu">## References</span>
|
|
1682
|
+
|
|
1683
|
+
<span class="c"><!-- REFERENCES --></span>
|
|
1684
|
+
</code></pre>
|
|
1685
|
+
|
|
1686
|
+
<p>
|
|
1687
|
+
<strong> Bibliography in metadata:</strong>
|
|
1688
|
+
</p>
|
|
1689
|
+
|
|
1690
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1691
|
+
<span class="na">bibliography</span><span class="pi">:</span> <span class="s">references.bib</span>
|
|
1692
|
+
<span class="nn">---</span>
|
|
1693
|
+
|
|
1694
|
+
See [@doe99] for details.
|
|
1695
|
+
</code></pre>
|
|
1696
|
+
|
|
1697
|
+
<p>
|
|
1698
|
+
<strong> Multiple bibliography files:</strong>
|
|
1699
|
+
</p>
|
|
1700
|
+
|
|
1701
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1702
|
+
<span class="na">bibliography</span><span class="pi">:</span>
|
|
1703
|
+
<span class="pi">-</span> <span class="s">refs1.bib</span>
|
|
1704
|
+
<span class="pi">-</span> <span class="s">refs2.bib</span>
|
|
1705
|
+
<span class="nn">---</span>
|
|
1706
|
+
</code></pre>
|
|
1707
|
+
|
|
1708
|
+
<p>
|
|
1709
|
+
For complete documentation of citations and bibliography, see <a href="Citations.html">Citations</a>.
|
|
1710
|
+
</p>
|
|
1711
|
+
|
|
1712
|
+
<h2 id="indices">
|
|
1713
|
+
Indices
|
|
1714
|
+
</h2>
|
|
1715
|
+
|
|
1716
|
+
<p>
|
|
1717
|
+
<strong> Note:</strong> Indices are supported in <strong>MultiMarkdown</strong> and <strong>unified</strong> modes. Enabled by default in these modes.
|
|
1718
|
+
</p>
|
|
1719
|
+
|
|
1720
|
+
<h3 id="mmark-index-syntax">
|
|
1721
|
+
mmark Index Syntax
|
|
1722
|
+
</h3>
|
|
1723
|
+
|
|
1724
|
+
<p>
|
|
1725
|
+
<strong> Basic index entry:</strong>
|
|
1726
|
+
</p>
|
|
1727
|
+
|
|
1728
|
+
<pre><code class="highlight language-markdown">This is about protocols (!Protocol).
|
|
1729
|
+
</code></pre>
|
|
1730
|
+
|
|
1731
|
+
<p>
|
|
1732
|
+
<strong> Sub-item entry:</strong>
|
|
1733
|
+
</p>
|
|
1734
|
+
|
|
1735
|
+
<pre><code class="highlight language-markdown">HTTP/1.1 (!HTTP, HTTP/1.1) is a protocol version.
|
|
1736
|
+
</code></pre>
|
|
1737
|
+
|
|
1738
|
+
<p>
|
|
1739
|
+
<strong> Primary entry (bold in index):</strong>
|
|
1740
|
+
</p>
|
|
1741
|
+
|
|
1742
|
+
<pre><code class="highlight language-markdown">This is a primary topic (!!Primary Topic, Sub Topic).
|
|
1743
|
+
</code></pre>
|
|
1744
|
+
|
|
1745
|
+
<p>
|
|
1746
|
+
<strong> Multiple entries:</strong>
|
|
1747
|
+
</p>
|
|
1748
|
+
|
|
1749
|
+
<pre><code class="highlight language-markdown">Protocols (!Protocol) and implementations (!Implementation) are important.
|
|
1750
|
+
</code></pre>
|
|
1751
|
+
|
|
1752
|
+
<h3 id="textindex-syntax">
|
|
1753
|
+
TextIndex Syntax
|
|
1754
|
+
</h3>
|
|
1755
|
+
|
|
1756
|
+
<p>
|
|
1757
|
+
<strong> Basic syntax (indexes preceding word):</strong>
|
|
1758
|
+
</p>
|
|
1759
|
+
|
|
1760
|
+
<pre><code class="highlight language-markdown">Most mechanical keyboard firmware{<span class="nt"><sup></span>}<span class="nt"></sup></span> supports key combinations.
|
|
1761
|
+
</code></pre>
|
|
1762
|
+
|
|
1763
|
+
<p>
|
|
1764
|
+
<strong> Explicit term:</strong>
|
|
1765
|
+
</p>
|
|
1766
|
+
|
|
1767
|
+
<pre><code class="highlight language-markdown">This uses <span class="nt"><span></span>key combinations<span class="nt"></span></span>
|
|
1768
|
+
for indexing.
|
|
1769
|
+
</code></pre>
|
|
1770
|
+
|
|
1771
|
+
<p>
|
|
1772
|
+
<strong> With parameters:</strong>
|
|
1773
|
+
</p>
|
|
1774
|
+
|
|
1775
|
+
<pre><code class="highlight language-markdown">Term{<span class="nt"><sup></span>param1<span class="nt"></sup></span> param2}
|
|
1776
|
+
</code></pre>
|
|
1777
|
+
|
|
1778
|
+
<h3 id="index-generation">
|
|
1779
|
+
Index Generation
|
|
1780
|
+
</h3>
|
|
1781
|
+
|
|
1782
|
+
<p>
|
|
1783
|
+
The index is automatically generated at the end of the document or at the <code><!--INDEX--></code> marker if present:
|
|
1784
|
+
</p>
|
|
1785
|
+
|
|
1786
|
+
<pre><code class="highlight language-markdown"><span class="gh"># Document</span>
|
|
1787
|
+
|
|
1788
|
+
This is about protocols (!Protocol).
|
|
1789
|
+
|
|
1790
|
+
<span class="c"><!--INDEX--></span>
|
|
1791
|
+
|
|
1792
|
+
More content after the index.
|
|
1793
|
+
</code></pre>
|
|
1794
|
+
|
|
1795
|
+
<p>
|
|
1796
|
+
<strong> Index features:</strong>
|
|
1797
|
+
</p>
|
|
1798
|
+
|
|
1799
|
+
<ul>
|
|
1800
|
+
|
|
1801
|
+
<li>
|
|
1802
|
+
Entries are sorted alphabetically
|
|
1803
|
+
</li>
|
|
1804
|
+
|
|
1805
|
+
<li>
|
|
1806
|
+
Can be grouped by first letter (default)
|
|
1807
|
+
</li>
|
|
1808
|
+
|
|
1809
|
+
<li>
|
|
1810
|
+
Sub-items are nested under main terms
|
|
1811
|
+
</li>
|
|
1812
|
+
|
|
1813
|
+
<li>
|
|
1814
|
+
Primary entries are marked (typically bold)
|
|
1815
|
+
</li>
|
|
1816
|
+
|
|
1817
|
+
<li>
|
|
1818
|
+
Each entry links back to its location in the document
|
|
1819
|
+
</li>
|
|
1820
|
+
|
|
1821
|
+
</ul>
|
|
1822
|
+
|
|
1823
|
+
<p>
|
|
1824
|
+
<strong> Suppress index:</strong>
|
|
1825
|
+
Use <code>--no-index</code> to suppress index generation while still creating index markers.
|
|
1826
|
+
</p>
|
|
1827
|
+
|
|
1828
|
+
<h2 id="math">
|
|
1829
|
+
Math
|
|
1830
|
+
</h2>
|
|
1831
|
+
|
|
1832
|
+
<p>
|
|
1833
|
+
<strong> Inline math:</strong>
|
|
1834
|
+
</p>
|
|
1835
|
+
|
|
1836
|
+
<pre><code class="highlight language-markdown">The equation $E = mc^2$ is famous.
|
|
1837
|
+
</code></pre>
|
|
1838
|
+
|
|
1839
|
+
<p>
|
|
1840
|
+
<strong> Display math:</strong>
|
|
1841
|
+
</p>
|
|
1842
|
+
|
|
1843
|
+
<pre><code class="highlight language-markdown">$$
|
|
1844
|
+
<span class="se">\i</span>nt_{-<span class="se">\i</span>nfty}^{<span class="se">\i</span>nfty} e^{-x^2} dx = <span class="se">\s</span>qrt{<span class="se">\p</span>i}
|
|
1845
|
+
$$
|
|
1846
|
+
</code></pre>
|
|
1847
|
+
|
|
1848
|
+
<p>
|
|
1849
|
+
Math is wrapped in spans with appropriate classes for MathJax or KaTeX.
|
|
1850
|
+
</p>
|
|
1851
|
+
|
|
1852
|
+
<h2 id="wiki-links">
|
|
1853
|
+
Wiki Links
|
|
1854
|
+
</h2>
|
|
1855
|
+
|
|
1856
|
+
<p>
|
|
1857
|
+
<strong> Note:</strong> Wiki links are <strong>disabled by default</strong> in all modes. Use <code>--wikilinks</code> to enable.
|
|
1858
|
+
</p>
|
|
1859
|
+
|
|
1860
|
+
<pre><code class="highlight language-markdown">[[Page Name]] # Link to page
|
|
1861
|
+
[[Page Name|Display Text]] # Custom display text
|
|
1862
|
+
|
|
1863
|
+
[[Page Name#Section]] # Link to section
|
|
1864
|
+
|
|
1865
|
+
[[Page Name#Section|Display]] # Custom display with section
|
|
1866
|
+
</code></pre>
|
|
1867
|
+
|
|
1868
|
+
<p>
|
|
1869
|
+
<strong> Example:</strong>
|
|
1870
|
+
</p>
|
|
1871
|
+
|
|
1872
|
+
<pre><code class="highlight language-bash">apex document.md <span class="nt">--wikilinks</span>
|
|
1873
|
+
</code></pre>
|
|
1874
|
+
|
|
1875
|
+
<h2 id="critic-markup">
|
|
1876
|
+
Critic Markup
|
|
1877
|
+
</h2>
|
|
1878
|
+
|
|
1879
|
+
<p>
|
|
1880
|
+
Track changes and annotations:
|
|
1881
|
+
</p>
|
|
1882
|
+
|
|
1883
|
+
<pre><code class="highlight language-markdown"><span class="nt"><ins</span> <span class="na">class=</span><span class="s">"critic"</span><span class="nt">></span>addition<span class="nt"></ins></span> # Added text
|
|
1884
|
+
<span class="nt"><del</span> <span class="na">class=</span><span class="s">"critic"</span><span class="nt">></span>deletion<span class="nt"></del></span> # Deleted text
|
|
1885
|
+
<span class="nt"><del</span> <span class="na">class=</span><span class="s">"critic break"</span><span class="nt">></span>old text<span class="nt"></del><ins</span> <span class="na">class=</span><span class="s">"critic break"</span><span class="nt">></span>new text<span class="nt"></ins></span> # Substitution
|
|
1886
|
+
<span class="nt"><mark</span> <span class="na">class=</span><span class="s">"critic"</span><span class="nt">></span>highlighted<span class="nt"></mark></span> # Highlighted text
|
|
1887
|
+
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"critic comment"</span><span class="nt">></span>comment text<span class="nt"></span></span> # Comment/annotation
|
|
1888
|
+
</code></pre>
|
|
1889
|
+
|
|
1890
|
+
<p>
|
|
1891
|
+
See <a href="Command-Line-Options.html">Command Line Options</a> for <code>--accept</code> and <code>--reject</code> modes.
|
|
1892
|
+
</p>
|
|
1893
|
+
|
|
1894
|
+
<h2 id="callouts">
|
|
1895
|
+
Callouts
|
|
1896
|
+
</h2>
|
|
1897
|
+
|
|
1898
|
+
<p>
|
|
1899
|
+
Bear/Obsidian/Xcode Playground syntax:
|
|
1900
|
+
</p>
|
|
1901
|
+
|
|
1902
|
+
<pre><code class="highlight language-markdown"><span class="gt">> [!NOTE] Title</span>
|
|
1903
|
+
<span class="gt">> This is a note callout</span>
|
|
1904
|
+
<span class="gt">
|
|
1905
|
+
> [!WARNING] Be Careful</span>
|
|
1906
|
+
<span class="gt">> Warning content</span>
|
|
1907
|
+
<span class="gt">
|
|
1908
|
+
> [!TIP] Pro Tip</span>
|
|
1909
|
+
<span class="gt">> Helpful advice</span>
|
|
1910
|
+
<span class="gt">
|
|
1911
|
+
> [!DANGER] Critical</span>
|
|
1912
|
+
<span class="gt">> Dangerous operation</span>
|
|
1913
|
+
<span class="gt">
|
|
1914
|
+
> [!INFO] Information</span>
|
|
1915
|
+
<span class="gt">> Informational content</span>
|
|
1916
|
+
</code></pre>
|
|
1917
|
+
|
|
1918
|
+
<p>
|
|
1919
|
+
<strong> Collapsible callouts:</strong>
|
|
1920
|
+
</p>
|
|
1921
|
+
|
|
1922
|
+
<pre><code class="highlight language-markdown"><span class="gt">> [!NOTE]+ Expandable</span>
|
|
1923
|
+
<span class="gt">> Defaults to open</span>
|
|
1924
|
+
<span class="gt">
|
|
1925
|
+
> [!NOTE]- Collapsed</span>
|
|
1926
|
+
<span class="gt">> Defaults to closed</span>
|
|
1927
|
+
</code></pre>
|
|
1928
|
+
|
|
1929
|
+
<h2 id="file-includes">
|
|
1930
|
+
File Includes
|
|
1931
|
+
</h2>
|
|
1932
|
+
|
|
1933
|
+
<p>
|
|
1934
|
+
<strong> Marked syntax:</strong>
|
|
1935
|
+
</p>
|
|
1936
|
+
|
|
1937
|
+
<pre><code class="highlight language-markdown"> # Include and process Markdown
|
|
1938
|
+
# Include as code block
|
|
1939
|
+
# Include raw <span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"Hypertext Markup Language"</span><span class="nt">></span>HTML<span class="nt"></abbr></span>
|
|
1940
|
+
</code></pre>
|
|
1941
|
+
|
|
1942
|
+
<p>
|
|
1943
|
+
<strong> MultiMarkdown transclusion:</strong>
|
|
1944
|
+
</p>
|
|
1945
|
+
|
|
1946
|
+
<pre><code class="highlight language-markdown">{{file.md}} # Include file
|
|
1947
|
+
{{file.<span class="err">*</span>}} # Prefer file.html, file.md, file.txt, file.tex (in that order)
|
|
1948
|
+
<span class="gh"># C API</span>
|
|
1949
|
+
|
|
1950
|
+
Apex provides a simple C API for programmatic Markdown to <span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"Hypertext Markup Language"</span><span class="nt">></span>HTML<span class="nt"></abbr></span> conversion.
|
|
1951
|
+
|
|
1952
|
+
<span class="gu">## Overview</span>
|
|
1953
|
+
|
|
1954
|
+
The Apex C API is thread-safe and designed for integration into C and C++ applications. All functions are declared in <span class="sb">`apex/apex.h`</span>.
|
|
1955
|
+
|
|
1956
|
+
<span class="gu">## Core Types</span>
|
|
1957
|
+
|
|
1958
|
+
<span class="gu">### apex_mode_t</span>
|
|
1959
|
+
|
|
1960
|
+
Processor compatibility modes:
|
|
1961
|
+
|
|
1962
|
+
<span class="p">```</span><span class="nl">c
|
|
1963
|
+
</span><span class="k">typedef</span> <span class="k">enum</span> <span class="p">{</span>
|
|
1964
|
+
<span class="n">APEX_MODE_COMMONMARK</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="cm">/* Pure CommonMark spec */</span>
|
|
1965
|
+
<span class="n">APEX_MODE_GFM</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="cm">/* GitHub Flavored Markdown */</span>
|
|
1966
|
+
<span class="n">APEX_MODE_MULTIMARKDOWN</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span> <span class="cm">/* MultiMarkdown compatibility */</span>
|
|
1967
|
+
<span class="n">APEX_MODE_KRAMDOWN</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span> <span class="cm">/* Kramdown compatibility */</span>
|
|
1968
|
+
<span class="n">APEX_MODE_UNIFIED</span> <span class="o">=</span> <span class="mi">4</span> <span class="cm">/* All features enabled */</span>
|
|
1969
|
+
<span class="p">}</span> <span class="n">apex_mode_t</span><span class="p">;</span>
|
|
1970
|
+
</code></pre>
|
|
1971
|
+
|
|
1972
|
+
<h3 id="apexoptions">
|
|
1973
|
+
apex_options
|
|
1974
|
+
</h3>
|
|
1975
|
+
|
|
1976
|
+
<p>
|
|
1977
|
+
Configuration structure for processing:
|
|
1978
|
+
</p>
|
|
1979
|
+
|
|
1980
|
+
<pre><code class="highlight language-c"><span class="k">typedef</span> <span class="k">struct</span> <span class="p">{</span>
|
|
1981
|
+
<span class="n">apex_mode_t</span> <span class="n">mode</span><span class="p">;</span>
|
|
1982
|
+
|
|
1983
|
+
<span class="cm">/* Feature flags */</span>
|
|
1984
|
+
<span class="n">bool</span> <span class="n">enable_tables</span><span class="p">;</span>
|
|
1985
|
+
<span class="n">bool</span> <span class="n">enable_footnotes</span><span class="p">;</span>
|
|
1986
|
+
<span class="n">bool</span> <span class="n">enable_definition_lists</span><span class="p">;</span>
|
|
1987
|
+
<span class="n">bool</span> <span class="n">enable_smart_typography</span><span class="p">;</span>
|
|
1988
|
+
<span class="n">bool</span> <span class="n">enable_math</span><span class="p">;</span>
|
|
1989
|
+
<span class="n">bool</span> <span class="n">enable_critic_markup</span><span class="p">;</span>
|
|
1990
|
+
<span class="n">bool</span> <span class="n">enable_wiki_links</span><span class="p">;</span>
|
|
1991
|
+
<span class="n">bool</span> <span class="n">enable_task_lists</span><span class="p">;</span>
|
|
1992
|
+
<span class="n">bool</span> <span class="n">enable_attributes</span><span class="p">;</span>
|
|
1993
|
+
<span class="n">bool</span> <span class="n">enable_callouts</span><span class="p">;</span>
|
|
1994
|
+
<span class="n">bool</span> <span class="n">enable_marked_extensions</span><span class="p">;</span>
|
|
1995
|
+
|
|
1996
|
+
<span class="cm">/* Critic markup mode */</span>
|
|
1997
|
+
<span class="kt">int</span> <span class="n">critic_mode</span><span class="p">;</span> <span class="cm">/* 0=accept, 1=reject, 2=markup (default) */</span>
|
|
1998
|
+
|
|
1999
|
+
<span class="cm">/* Metadata handling */</span>
|
|
2000
|
+
<span class="n">bool</span> <span class="n">strip_metadata</span><span class="p">;</span>
|
|
2001
|
+
<span class="n">bool</span> <span class="n">enable_metadata_variables</span><span class="p">;</span>
|
|
2002
|
+
|
|
2003
|
+
<span class="cm">/* File inclusion */</span>
|
|
2004
|
+
<span class="n">bool</span> <span class="n">enable_file_includes</span><span class="p">;</span>
|
|
2005
|
+
<span class="kt">int</span> <span class="n">max_include_depth</span><span class="p">;</span>
|
|
2006
|
+
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">base_directory</span><span class="p">;</span>
|
|
2007
|
+
|
|
2008
|
+
<span class="cm">/* Output options */</span>
|
|
2009
|
+
<span class="n">bool</span> <span class="n">unsafe</span><span class="p">;</span> <span class="cm">/* Allow raw <abbr title="Hypertext Markup Language">HTML</abbr> */</span>
|
|
2010
|
+
<span class="n">bool</span> <span class="n">validate_utf8</span><span class="p">;</span>
|
|
2011
|
+
<span class="n">bool</span> <span class="n">github_pre_lang</span><span class="p">;</span>
|
|
2012
|
+
<span class="n">bool</span> <span class="n">standalone</span><span class="p">;</span> <span class="cm">/* Generate complete <abbr title="Hypertext Markup Language">HTML</abbr> document */</span>
|
|
2013
|
+
<span class="n">bool</span> <span class="n">pretty</span><span class="p">;</span> <span class="cm">/* Pretty-print <abbr title="Hypertext Markup Language">HTML</abbr> */</span>
|
|
2014
|
+
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">stylesheet_path</span><span class="p">;</span>
|
|
2015
|
+
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">document_title</span><span class="p">;</span>
|
|
2016
|
+
|
|
2017
|
+
<span class="cm">/* Line break handling */</span>
|
|
2018
|
+
<span class="n">bool</span> <span class="n">hardbreaks</span><span class="p">;</span> <span class="cm">/* Treat newlines as hard breaks */</span>
|
|
2019
|
+
<span class="n">bool</span> <span class="n">nobreaks</span><span class="p">;</span> <span class="cm">/* Render soft breaks as spaces */</span>
|
|
2020
|
+
|
|
2021
|
+
<span class="cm">/* Header ID generation */</span>
|
|
2022
|
+
<span class="n">bool</span> <span class="n">generate_header_ids</span><span class="p">;</span>
|
|
2023
|
+
<span class="n">bool</span> <span class="n">header_anchors</span><span class="p">;</span> <span class="cm">/* Generate <a> tags instead of id attributes */</span>
|
|
2024
|
+
<span class="kt">int</span> <span class="n">id_format</span><span class="p">;</span> <span class="cm">/* 0=GFM, 1=<abbr title="MultiMarkdown">MMD</abbr>, 2=Kramdown */</span>
|
|
2025
|
+
|
|
2026
|
+
<span class="cm">/* Table options */</span>
|
|
2027
|
+
<span class="n">bool</span> <span class="n">relaxed_tables</span><span class="p">;</span>
|
|
2028
|
+
|
|
2029
|
+
<span class="cm">/* List options */</span>
|
|
2030
|
+
<span class="n">bool</span> <span class="n">allow_mixed_list_markers</span><span class="p">;</span> <span class="cm">/* Allow mixed list markers at same level (inherit type from first item) */</span>
|
|
2031
|
+
<span class="n">bool</span> <span class="n">allow_alpha_lists</span><span class="p">;</span> <span class="cm">/* Support alpha list markers (a., b., c. and A., B., C.) */</span>
|
|
2032
|
+
<span class="p">}</span> <span class="n">apex_options</span><span class="p">;</span>
|
|
2033
|
+
</code></pre>
|
|
2034
|
+
|
|
2035
|
+
<h2 id="core-functions">
|
|
2036
|
+
Core Functions
|
|
2037
|
+
</h2>
|
|
2038
|
+
|
|
2039
|
+
<h3 id="apexoptionsdefault">
|
|
2040
|
+
apex_options_default
|
|
2041
|
+
</h3>
|
|
2042
|
+
|
|
2043
|
+
<p>
|
|
2044
|
+
Get default options with all features enabled (unified mode).
|
|
2045
|
+
</p>
|
|
2046
|
+
|
|
2047
|
+
<pre><code class="highlight language-c"><span class="n">apex_options</span> <span class="nf">apex_options_default</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
|
|
2048
|
+
</code></pre>
|
|
2049
|
+
|
|
2050
|
+
<p>
|
|
2051
|
+
<strong> Returns:</strong> Default options structure
|
|
2052
|
+
</p>
|
|
2053
|
+
|
|
2054
|
+
<p>
|
|
2055
|
+
<strong> Example:</strong>
|
|
2056
|
+
</p>
|
|
2057
|
+
|
|
2058
|
+
<pre><code class="highlight language-c"><span class="n">apex_options</span> <span class="n">opts</span> <span class="o">=</span> <span class="n">apex_options_default</span><span class="p">();</span>
|
|
2059
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">enable_math</span> <span class="o">=</span> <span class="nb">true</span><span class="p">;</span>
|
|
2060
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">pretty</span> <span class="o">=</span> <span class="nb">true</span><span class="p">;</span>
|
|
2061
|
+
</code></pre>
|
|
2062
|
+
|
|
2063
|
+
<h3 id="apexoptionsformode">
|
|
2064
|
+
apex_options_for_mode
|
|
2065
|
+
</h3>
|
|
2066
|
+
|
|
2067
|
+
<p>
|
|
2068
|
+
Get options configured for a specific processor mode.
|
|
2069
|
+
</p>
|
|
2070
|
+
|
|
2071
|
+
<pre><code class="highlight language-c"><span class="n">apex_options</span> <span class="nf">apex_options_for_mode</span><span class="p">(</span><span class="n">apex_mode_t</span> <span class="n">mode</span><span class="p">);</span>
|
|
2072
|
+
</code></pre>
|
|
2073
|
+
|
|
2074
|
+
<p>
|
|
2075
|
+
<strong> Parameters:</strong>
|
|
2076
|
+
</p>
|
|
2077
|
+
|
|
2078
|
+
<ul>
|
|
2079
|
+
|
|
2080
|
+
<li>
|
|
2081
|
+
<code>mode</code> - Desired processor mode
|
|
2082
|
+
</li>
|
|
2083
|
+
|
|
2084
|
+
</ul>
|
|
2085
|
+
|
|
2086
|
+
<p>
|
|
2087
|
+
<strong> Returns:</strong> Options configured for the specified mode
|
|
2088
|
+
</p>
|
|
2089
|
+
|
|
2090
|
+
<p>
|
|
2091
|
+
<strong> Example:</strong>
|
|
2092
|
+
</p>
|
|
2093
|
+
|
|
2094
|
+
<pre><code class="highlight language-c"><span class="n">apex_options</span> <span class="n">gfm_opts</span> <span class="o">=</span> <span class="n">apex_options_for_mode</span><span class="p">(</span><span class="n">APEX_MODE_GFM</span><span class="p">);</span>
|
|
2095
|
+
<span class="n">apex_options</span> <span class="n">mmd_opts</span> <span class="o">=</span> <span class="n">apex_options_for_mode</span><span class="p">(</span><span class="n">APEX_MODE_MULTIMARKDOWN</span><span class="p">);</span>
|
|
2096
|
+
</code></pre>
|
|
2097
|
+
|
|
2098
|
+
<h3 id="apexmarkdowntohtml">
|
|
2099
|
+
apex_markdown_to_html
|
|
2100
|
+
</h3>
|
|
2101
|
+
|
|
2102
|
+
<p>
|
|
2103
|
+
Main conversion function - converts Markdown to <abbr title="Hypertext Markup Language">HTML</abbr>.
|
|
2104
|
+
</p>
|
|
2105
|
+
|
|
2106
|
+
<pre><code class="highlight language-c"><span class="kt">char</span> <span class="o">*</span><span class="nf">apex_markdown_to_html</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">markdown</span><span class="p">,</span> <span class="kt">size_t</span> <span class="n">len</span><span class="p">,</span>
|
|
2107
|
+
<span class="k">const</span> <span class="n">apex_options</span> <span class="o">*</span><span class="n">options</span><span class="p">);</span>
|
|
2108
|
+
</code></pre>
|
|
2109
|
+
|
|
2110
|
+
<p>
|
|
2111
|
+
<strong> Parameters:</strong>
|
|
2112
|
+
</p>
|
|
2113
|
+
|
|
2114
|
+
<ul>
|
|
2115
|
+
|
|
2116
|
+
<li>
|
|
2117
|
+
<code>markdown</code> - Input Markdown text (UTF-8)
|
|
2118
|
+
</li>
|
|
2119
|
+
|
|
2120
|
+
<li>
|
|
2121
|
+
<code>len</code> - Length of input text (use <code>strlen()</code> if null-terminated)
|
|
2122
|
+
</li>
|
|
2123
|
+
|
|
2124
|
+
<li>
|
|
2125
|
+
<code>options</code> - Processing options (NULL for defaults)
|
|
2126
|
+
</li>
|
|
2127
|
+
|
|
2128
|
+
</ul>
|
|
2129
|
+
|
|
2130
|
+
<p>
|
|
2131
|
+
<strong> Returns:</strong> Newly allocated <abbr title="Hypertext Markup Language">HTML</abbr> string (must be freed with <code>apex_free_string</code>), or NULL on error
|
|
2132
|
+
</p>
|
|
2133
|
+
|
|
2134
|
+
<p>
|
|
2135
|
+
<strong> Example:</strong>
|
|
2136
|
+
</p>
|
|
2137
|
+
|
|
2138
|
+
<pre><code class="highlight language-c"><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">markdown</span> <span class="o">=</span> <span class="s">"# Hello</span><span class="se">\n\n</span><span class="s">This is **bold**."</span><span class="p">;</span>
|
|
2139
|
+
<span class="n">apex_options</span> <span class="n">opts</span> <span class="o">=</span> <span class="n">apex_options_default</span><span class="p">();</span>
|
|
2140
|
+
<span class="kt">char</span> <span class="o">*</span><span class="n">html</span> <span class="o">=</span> <span class="n">apex_markdown_to_html</span><span class="p">(</span><span class="n">markdown</span><span class="p">,</span> <span class="n">strlen</span><span class="p">(</span><span class="n">markdown</span><span class="p">),</span> <span class="o">&</span><span class="n">opts</span><span class="p">);</span>
|
|
2141
|
+
|
|
2142
|
+
<span class="k">if</span> <span class="p">(</span><span class="n">html</span><span class="p">)</span> <span class="p">{</span>
|
|
2143
|
+
<span class="n">printf</span><span class="p">(</span><span class="s">"%s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">html</span><span class="p">);</span>
|
|
2144
|
+
<span class="n">apex_free_string</span><span class="p">(</span><span class="n">html</span><span class="p">);</span>
|
|
2145
|
+
<span class="p">}</span>
|
|
2146
|
+
</code></pre>
|
|
2147
|
+
|
|
2148
|
+
<h3 id="apexfreestring">
|
|
2149
|
+
apex_free_string
|
|
2150
|
+
</h3>
|
|
2151
|
+
|
|
2152
|
+
<p>
|
|
2153
|
+
Free a string allocated by Apex.
|
|
2154
|
+
</p>
|
|
2155
|
+
|
|
2156
|
+
<pre><code class="highlight language-c"><span class="kt">void</span> <span class="nf">apex_free_string</span><span class="p">(</span><span class="kt">char</span> <span class="o">*</span><span class="n">str</span><span class="p">);</span>
|
|
2157
|
+
</code></pre>
|
|
2158
|
+
|
|
2159
|
+
<p>
|
|
2160
|
+
<strong> Parameters:</strong>
|
|
2161
|
+
</p>
|
|
2162
|
+
|
|
2163
|
+
<ul>
|
|
2164
|
+
|
|
2165
|
+
<li>
|
|
2166
|
+
<code>str</code> - String to free (can be NULL, safe to call on NULL)
|
|
2167
|
+
</li>
|
|
2168
|
+
|
|
2169
|
+
</ul>
|
|
2170
|
+
|
|
2171
|
+
<p>
|
|
2172
|
+
<strong> Example:</strong>
|
|
2173
|
+
</p>
|
|
2174
|
+
|
|
2175
|
+
<pre><code class="highlight language-c"><span class="kt">char</span> <span class="o">*</span><span class="n">html</span> <span class="o">=</span> <span class="n">apex_markdown_to_html</span><span class="p">(</span><span class="n">markdown</span><span class="p">,</span> <span class="n">len</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">);</span>
|
|
2176
|
+
<span class="n">Use</span> <span class="n">html</span><span class="p">...</span>
|
|
2177
|
+
<span class="n">apex_free_string</span><span class="p">(</span><span class="n">html</span><span class="p">);</span>
|
|
2178
|
+
</code></pre>
|
|
2179
|
+
|
|
2180
|
+
<h3 id="apexwraphtmldocument">
|
|
2181
|
+
apex_wrap_html_document
|
|
2182
|
+
</h3>
|
|
2183
|
+
|
|
2184
|
+
<p>
|
|
2185
|
+
Wrap <abbr title="Hypertext Markup Language">HTML</abbr> content in a complete HTML5 document structure.
|
|
2186
|
+
</p>
|
|
2187
|
+
|
|
2188
|
+
<pre><code class="highlight language-c"><span class="kt">char</span> <span class="o">*</span><span class="nf">apex_wrap_html_document</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">content</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">title</span><span class="p">,</span>
|
|
2189
|
+
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">stylesheet_path</span><span class="p">);</span>
|
|
2190
|
+
</code></pre>
|
|
2191
|
+
|
|
2192
|
+
<p>
|
|
2193
|
+
<strong> Parameters:</strong>
|
|
2194
|
+
</p>
|
|
2195
|
+
|
|
2196
|
+
<ul>
|
|
2197
|
+
|
|
2198
|
+
<li>
|
|
2199
|
+
<code>content</code> - <abbr title="Hypertext Markup Language">HTML</abbr> content to wrap
|
|
2200
|
+
</li>
|
|
2201
|
+
|
|
2202
|
+
<li>
|
|
2203
|
+
<code>title</code> - Document title (NULL for default “Document”)
|
|
2204
|
+
</li>
|
|
2205
|
+
|
|
2206
|
+
<li>
|
|
2207
|
+
<code>stylesheet_path</code> - Path to <abbr title="Cascading Style Sheets">CSS</abbr> file to link (NULL for none)
|
|
2208
|
+
</li>
|
|
2209
|
+
|
|
2210
|
+
</ul>
|
|
2211
|
+
|
|
2212
|
+
<p>
|
|
2213
|
+
<strong> Returns:</strong> Newly allocated <abbr title="Hypertext Markup Language">HTML</abbr> document string (must be freed with <code>apex_free_string</code>)
|
|
2214
|
+
</p>
|
|
2215
|
+
|
|
2216
|
+
<p>
|
|
2217
|
+
<strong> Example:</strong>
|
|
2218
|
+
</p>
|
|
2219
|
+
|
|
2220
|
+
<pre><code class="highlight language-c"><span class="kt">char</span> <span class="o">*</span><span class="n">fragment</span> <span class="o">=</span> <span class="n">apex_markdown_to_html</span><span class="p">(</span><span class="n">markdown</span><span class="p">,</span> <span class="n">len</span><span class="p">,</span> <span class="o">&</span><span class="n">opts</span><span class="p">);</span>
|
|
2221
|
+
<span class="kt">char</span> <span class="o">*</span><span class="n">document</span> <span class="o">=</span> <span class="n">apex_wrap_html_document</span><span class="p">(</span><span class="n">fragment</span><span class="p">,</span> <span class="s">"My Document"</span><span class="p">,</span> <span class="s">"style.css"</span><span class="p">);</span>
|
|
2222
|
+
<span class="n">apex_free_string</span><span class="p">(</span><span class="n">fragment</span><span class="p">);</span>
|
|
2223
|
+
<span class="n">Use</span> <span class="n">document</span><span class="p">...</span>
|
|
2224
|
+
<span class="n">apex_free_string</span><span class="p">(</span><span class="n">document</span><span class="p">);</span>
|
|
2225
|
+
</code></pre>
|
|
2226
|
+
|
|
2227
|
+
<h3 id="apexprettyprinthtml">
|
|
2228
|
+
apex_pretty_print_html
|
|
2229
|
+
</h3>
|
|
2230
|
+
|
|
2231
|
+
<p>
|
|
2232
|
+
Pretty-print <abbr title="Hypertext Markup Language">HTML</abbr> with proper indentation.
|
|
2233
|
+
</p>
|
|
2234
|
+
|
|
2235
|
+
<pre><code class="highlight language-c"><span class="kt">char</span> <span class="o">*</span><span class="nf">apex_pretty_print_html</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">html</span><span class="p">);</span>
|
|
2236
|
+
</code></pre>
|
|
2237
|
+
|
|
2238
|
+
<p>
|
|
2239
|
+
<strong> Parameters:</strong>
|
|
2240
|
+
</p>
|
|
2241
|
+
|
|
2242
|
+
<ul>
|
|
2243
|
+
|
|
2244
|
+
<li>
|
|
2245
|
+
<code>html</code> - <abbr title="Hypertext Markup Language">HTML</abbr> to format
|
|
2246
|
+
</li>
|
|
2247
|
+
|
|
2248
|
+
</ul>
|
|
2249
|
+
|
|
2250
|
+
<p>
|
|
2251
|
+
<strong> Returns:</strong> Newly allocated formatted <abbr title="Hypertext Markup Language">HTML</abbr> string (must be freed with <code>apex_free_string</code>)
|
|
2252
|
+
</p>
|
|
2253
|
+
|
|
2254
|
+
<p>
|
|
2255
|
+
<strong> Example:</strong>
|
|
2256
|
+
</p>
|
|
2257
|
+
|
|
2258
|
+
<pre><code class="highlight language-c"><span class="kt">char</span> <span class="o">*</span><span class="n">html</span> <span class="o">=</span> <span class="n">apex_markdown_to_html</span><span class="p">(</span><span class="n">markdown</span><span class="p">,</span> <span class="n">len</span><span class="p">,</span> <span class="o">&</span><span class="n">opts</span><span class="p">);</span>
|
|
2259
|
+
<span class="kt">char</span> <span class="o">*</span><span class="n">pretty</span> <span class="o">=</span> <span class="n">apex_pretty_print_html</span><span class="p">(</span><span class="n">html</span><span class="p">);</span>
|
|
2260
|
+
<span class="n">apex_free_string</span><span class="p">(</span><span class="n">html</span><span class="p">);</span>
|
|
2261
|
+
<span class="n">Use</span> <span class="n">pretty</span><span class="p">...</span>
|
|
2262
|
+
<span class="n">apex_free_string</span><span class="p">(</span><span class="n">pretty</span><span class="p">);</span>
|
|
2263
|
+
</code></pre>
|
|
2264
|
+
|
|
2265
|
+
<h2 id="version-functions">
|
|
2266
|
+
Version Functions
|
|
2267
|
+
</h2>
|
|
2268
|
+
|
|
2269
|
+
<h3 id="apexversionstring">
|
|
2270
|
+
apex_version_string
|
|
2271
|
+
</h3>
|
|
2272
|
+
|
|
2273
|
+
<p>
|
|
2274
|
+
Get version string.
|
|
2275
|
+
</p>
|
|
2276
|
+
|
|
2277
|
+
<pre><code class="highlight language-c"><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="nf">apex_version_string</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
|
|
2278
|
+
</code></pre>
|
|
2279
|
+
|
|
2280
|
+
<p>
|
|
2281
|
+
<strong> Returns:</strong> Version string (e.g., “0.1.0”)
|
|
2282
|
+
</p>
|
|
2283
|
+
|
|
2284
|
+
<h3 id="apexversionmajor-apexversionminor-apexversionpatch">
|
|
2285
|
+
apex_version_major / apex_version_minor / apex_version_patch
|
|
2286
|
+
</h3>
|
|
2287
|
+
|
|
2288
|
+
<p>
|
|
2289
|
+
Get individual version components.
|
|
2290
|
+
</p>
|
|
2291
|
+
|
|
2292
|
+
<pre><code class="highlight language-c"><span class="kt">int</span> <span class="nf">apex_version_major</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
|
|
2293
|
+
<span class="kt">int</span> <span class="nf">apex_version_minor</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
|
|
2294
|
+
<span class="kt">int</span> <span class="nf">apex_version_patch</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
|
|
2295
|
+
</code></pre>
|
|
2296
|
+
|
|
2297
|
+
<p>
|
|
2298
|
+
<strong> Returns:</strong> Version component as integer
|
|
2299
|
+
</p>
|
|
2300
|
+
|
|
2301
|
+
<h2 id="list-options">
|
|
2302
|
+
List Options
|
|
2303
|
+
</h2>
|
|
2304
|
+
|
|
2305
|
+
<h3 id="mixed-list-markers">
|
|
2306
|
+
Mixed List Markers
|
|
2307
|
+
</h3>
|
|
2308
|
+
|
|
2309
|
+
<p>
|
|
2310
|
+
When <code>allow_mixed_list_markers</code> is enabled, lists with different marker types at the same indentation level will inherit the type from the first item. This is enabled by default in <strong>MultiMarkdown</strong> and <strong>Unified</strong> modes.
|
|
2311
|
+
</p>
|
|
2312
|
+
|
|
2313
|
+
<pre><code class="highlight language-c"><span class="n">apex_options</span> <span class="n">opts</span> <span class="o">=</span> <span class="n">apex_options_for_mode</span><span class="p">(</span><span class="n">APEX_MODE_UNIFIED</span><span class="p">);</span>
|
|
2314
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">allow_mixed_list_markers</span> <span class="n">is</span> <span class="nb">true</span> <span class="n">by</span> <span class="k">default</span>
|
|
2315
|
+
|
|
2316
|
+
<span class="n">To</span> <span class="n">enable</span> <span class="n">in</span> <span class="n">other</span> <span class="n">modes</span><span class="o">:</span>
|
|
2317
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">allow_mixed_list_markers</span> <span class="o">=</span> <span class="nb">true</span><span class="p">;</span>
|
|
2318
|
+
|
|
2319
|
+
<span class="n">To</span> <span class="n">disable</span> <span class="n">in</span> <span class="n">unified</span><span class="o">/</span><span class="n">multimarkdown</span> <span class="n">modes</span><span class="o">:</span>
|
|
2320
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">allow_mixed_list_markers</span> <span class="o">=</span> <span class="nb">false</span><span class="p">;</span>
|
|
2321
|
+
</code></pre>
|
|
2322
|
+
|
|
2323
|
+
<p>
|
|
2324
|
+
<strong> Example markdown:</strong>
|
|
2325
|
+
</p>
|
|
2326
|
+
|
|
2327
|
+
<pre><code class="highlight language-markdown"><span class="p">1.</span> First numbered item
|
|
2328
|
+
<span class="p">*</span> Second item (becomes numbered)
|
|
2329
|
+
<span class="p">*</span> Third item (becomes numbered)
|
|
2330
|
+
</code></pre>
|
|
2331
|
+
|
|
2332
|
+
<h3 id="alpha-lists">
|
|
2333
|
+
Alpha Lists
|
|
2334
|
+
</h3>
|
|
2335
|
+
|
|
2336
|
+
<p>
|
|
2337
|
+
When <code>allow_alpha_lists</code> is enabled, alphabetic markers (<code>a.</code>, <code>b.</code>, <code>c.</code> for lower-alpha and <code>A.</code>, <code>B.</code>, <code>C.</code> for upper-alpha) are converted to <abbr title="Hypertext Markup Language">HTML</abbr> lists with appropriate <code>list-style-type</code> <abbr title="Cascading Style Sheets">CSS</abbr>. This is enabled by default in <strong>Unified</strong> mode only.
|
|
2338
|
+
</p>
|
|
2339
|
+
|
|
2340
|
+
<pre><code class="highlight language-c"><span class="n">apex_options</span> <span class="n">opts</span> <span class="o">=</span> <span class="n">apex_options_for_mode</span><span class="p">(</span><span class="n">APEX_MODE_UNIFIED</span><span class="p">);</span>
|
|
2341
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">allow_alpha_lists</span> <span class="n">is</span> <span class="nb">true</span> <span class="n">by</span> <span class="k">default</span>
|
|
2342
|
+
|
|
2343
|
+
<span class="n">To</span> <span class="n">enable</span> <span class="n">in</span> <span class="n">other</span> <span class="n">modes</span><span class="o">:</span>
|
|
2344
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">allow_alpha_lists</span> <span class="o">=</span> <span class="nb">true</span><span class="p">;</span>
|
|
2345
|
+
|
|
2346
|
+
<span class="n">To</span> <span class="n">disable</span> <span class="n">in</span> <span class="n">unified</span> <span class="n">mode</span><span class="o">:</span>
|
|
2347
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">allow_alpha_lists</span> <span class="o">=</span> <span class="nb">false</span><span class="p">;</span>
|
|
2348
|
+
</code></pre>
|
|
2349
|
+
|
|
2350
|
+
<p>
|
|
2351
|
+
<strong> Example markdown:</strong>
|
|
2352
|
+
</p>
|
|
2353
|
+
|
|
2354
|
+
<pre><code class="highlight language-markdown">[apex-alpha-list:lower]
|
|
2355
|
+
<span class="p">
|
|
2356
|
+
1.</span> First item
|
|
2357
|
+
<span class="p">2.</span> Second item
|
|
2358
|
+
<span class="p">3.</span> Third item
|
|
2359
|
+
</code></pre>
|
|
2360
|
+
|
|
2361
|
+
<p>
|
|
2362
|
+
This produces <abbr title="Hypertext Markup Language">HTML</abbr> with <code>style="list-style-type: lower-alpha"</code> on the <code><ol></code> tag.
|
|
2363
|
+
</p>
|
|
2364
|
+
|
|
2365
|
+
<h2 id="feature-flags">
|
|
2366
|
+
Feature Flags
|
|
2367
|
+
</h2>
|
|
2368
|
+
|
|
2369
|
+
<p>
|
|
2370
|
+
All feature flags control whether specific Markdown extensions are enabled:
|
|
2371
|
+
</p>
|
|
2372
|
+
|
|
2373
|
+
<ul>
|
|
2374
|
+
|
|
2375
|
+
<li>
|
|
2376
|
+
<code>enable_tables</code> - GFM-style tables
|
|
2377
|
+
</li>
|
|
2378
|
+
|
|
2379
|
+
<li>
|
|
2380
|
+
<code>enable_footnotes</code> - Reference and inline footnotes
|
|
2381
|
+
</li>
|
|
2382
|
+
|
|
2383
|
+
<li>
|
|
2384
|
+
<code>enable_definition_lists</code> - Definition lists (term: definition)
|
|
2385
|
+
</li>
|
|
2386
|
+
|
|
2387
|
+
<li>
|
|
2388
|
+
<code>enable_smart_typography</code> - Smart quotes, dashes, ellipsis
|
|
2389
|
+
</li>
|
|
2390
|
+
|
|
2391
|
+
<li>
|
|
2392
|
+
<code>enable_math</code> - LaTeX math (inline <code>$...$</code> and display <code>$$...$$</code>)
|
|
2393
|
+
</li>
|
|
2394
|
+
|
|
2395
|
+
<li>
|
|
2396
|
+
<code>enable_critic_markup</code> - Critic Markup for change tracking
|
|
2397
|
+
</li>
|
|
2398
|
+
|
|
2399
|
+
<li>
|
|
2400
|
+
<code>enable_wiki_links</code> - <code>[[WikiLink]]</code> syntax
|
|
2401
|
+
</li>
|
|
2402
|
+
|
|
2403
|
+
<li>
|
|
2404
|
+
<code>enable_task_lists</code> - GFM task lists (<code>- [ ]</code> and <code>- [x]</code>)
|
|
2405
|
+
</li>
|
|
2406
|
+
|
|
2407
|
+
<li>
|
|
2408
|
+
<code>enable_attributes</code> - Inline Attribute Lists (IAL)
|
|
2409
|
+
</li>
|
|
2410
|
+
|
|
2411
|
+
<li>
|
|
2412
|
+
<code>enable_callouts</code> - Bear/Obsidian-style callouts
|
|
2413
|
+
</li>
|
|
2414
|
+
|
|
2415
|
+
<li>
|
|
2416
|
+
<code>enable_marked_extensions</code> - Marked app extensions (TOC, page breaks, etc.)
|
|
2417
|
+
</li>
|
|
2418
|
+
|
|
2419
|
+
</ul>
|
|
2420
|
+
|
|
2421
|
+
<p>
|
|
2422
|
+
These are typically enabled/disabled based on the selected mode, but can be overridden.
|
|
2423
|
+
</p>
|
|
2424
|
+
|
|
2425
|
+
<h2 id="metadata-options">
|
|
2426
|
+
Metadata Options
|
|
2427
|
+
</h2>
|
|
2428
|
+
|
|
2429
|
+
<ul>
|
|
2430
|
+
|
|
2431
|
+
<li>
|
|
2432
|
+
<code>strip_metadata</code> - Remove metadata from output (default: true)
|
|
2433
|
+
</li>
|
|
2434
|
+
|
|
2435
|
+
<li>
|
|
2436
|
+
<code>enable_metadata_variables</code> - Enable <code>[%key]</code> variable replacement (default: true in <abbr title="MultiMarkdown">MMD</abbr>/Kramdown/Unified modes)
|
|
2437
|
+
</li>
|
|
2438
|
+
|
|
2439
|
+
</ul>
|
|
2440
|
+
|
|
2441
|
+
<h2 id="file-inclusion">
|
|
2442
|
+
File Inclusion
|
|
2443
|
+
</h2>
|
|
2444
|
+
|
|
2445
|
+
<ul>
|
|
2446
|
+
|
|
2447
|
+
<li>
|
|
2448
|
+
<code>enable_file_includes</code> - Enable file inclusion syntax (``, <code>{{file.md}}</code>, `/file.md`)
|
|
2449
|
+
</li>
|
|
2450
|
+
|
|
2451
|
+
<li>
|
|
2452
|
+
<code>max_include_depth</code> - Maximum nesting depth for includes (default: 10)
|
|
2453
|
+
</li>
|
|
2454
|
+
|
|
2455
|
+
<li>
|
|
2456
|
+
<code>base_directory</code> - Base directory for resolving relative include paths (NULL = current directory)
|
|
2457
|
+
</li>
|
|
2458
|
+
|
|
2459
|
+
</ul>
|
|
2460
|
+
|
|
2461
|
+
<h2 id="output-options">
|
|
2462
|
+
Output Options
|
|
2463
|
+
</h2>
|
|
2464
|
+
|
|
2465
|
+
<ul>
|
|
2466
|
+
|
|
2467
|
+
<li>
|
|
2468
|
+
<code>unsafe</code> - Allow raw <abbr title="Hypertext Markup Language">HTML</abbr> in output (default: true)
|
|
2469
|
+
</li>
|
|
2470
|
+
|
|
2471
|
+
<li>
|
|
2472
|
+
<code>validate_utf8</code> - Validate UTF-8 encoding (default: true)
|
|
2473
|
+
</li>
|
|
2474
|
+
|
|
2475
|
+
<li>
|
|
2476
|
+
<code>github_pre_lang</code> - Use GitHub-style code block language format (default: true)
|
|
2477
|
+
</li>
|
|
2478
|
+
|
|
2479
|
+
<li>
|
|
2480
|
+
<code>standalone</code> - Generate complete <abbr title="Hypertext Markup Language">HTML</abbr> document with <code><html></code>, <code><head></code>, <code><body></code> (default: false)
|
|
2481
|
+
</li>
|
|
2482
|
+
|
|
2483
|
+
<li>
|
|
2484
|
+
<code>pretty</code> - Pretty-print <abbr title="Hypertext Markup Language">HTML</abbr> with indentation (default: false)
|
|
2485
|
+
</li>
|
|
2486
|
+
|
|
2487
|
+
<li>
|
|
2488
|
+
<code>stylesheet_path</code> - Path to <abbr title="Cascading Style Sheets">CSS</abbr> file to link in <code><head></code> (requires <code>standalone</code>)
|
|
2489
|
+
</li>
|
|
2490
|
+
|
|
2491
|
+
<li>
|
|
2492
|
+
<code>document_title</code> - Title for <abbr title="Hypertext Markup Language">HTML</abbr> document (requires <code>standalone</code>)
|
|
2493
|
+
</li>
|
|
2494
|
+
|
|
2495
|
+
</ul>
|
|
2496
|
+
|
|
2497
|
+
<h2 id="line-break-options">
|
|
2498
|
+
Line Break Options
|
|
2499
|
+
</h2>
|
|
2500
|
+
|
|
2501
|
+
<ul>
|
|
2502
|
+
|
|
2503
|
+
<li>
|
|
2504
|
+
<code>hardbreaks</code> - Treat newlines as hard breaks (<code><br></code>) like GFM (default: false, true in GFM mode)
|
|
2505
|
+
</li>
|
|
2506
|
+
|
|
2507
|
+
<li>
|
|
2508
|
+
<code>nobreaks</code> - Render soft breaks as spaces instead of newlines (default: false)
|
|
2509
|
+
</li>
|
|
2510
|
+
|
|
2511
|
+
</ul>
|
|
2512
|
+
|
|
2513
|
+
<h2 id="header-id-options">
|
|
2514
|
+
Header ID Options
|
|
2515
|
+
</h2>
|
|
2516
|
+
|
|
2517
|
+
<ul>
|
|
2518
|
+
|
|
2519
|
+
<li>
|
|
2520
|
+
<code>generate_header_ids</code> - Automatically generate IDs for headers (default: true)
|
|
2521
|
+
</li>
|
|
2522
|
+
|
|
2523
|
+
<li>
|
|
2524
|
+
<code>header_anchors</code> - Generate <code><a></code> anchor tags instead of <code>id</code> attributes (default: false)
|
|
2525
|
+
</li>
|
|
2526
|
+
|
|
2527
|
+
<li>
|
|
2528
|
+
<code>id_format</code> - ID format: <code>0</code> = GFM (with dashes), <code>1</code> = <abbr title="MultiMarkdown">MMD</abbr> (no dashes), <code>2</code> = Kramdown
|
|
2529
|
+
</li>
|
|
2530
|
+
|
|
2531
|
+
</ul>
|
|
2532
|
+
|
|
2533
|
+
<h2 id="table-options">
|
|
2534
|
+
Table Options
|
|
2535
|
+
</h2>
|
|
2536
|
+
|
|
2537
|
+
<ul>
|
|
2538
|
+
|
|
2539
|
+
<li>
|
|
2540
|
+
<code>relaxed_tables</code> - Support tables without separator rows (Kramdown-style, default: true in Unified/Kramdown modes)
|
|
2541
|
+
</li>
|
|
2542
|
+
|
|
2543
|
+
</ul>
|
|
2544
|
+
|
|
2545
|
+
<h2 id="complete-example">
|
|
2546
|
+
Complete Example
|
|
2547
|
+
</h2>
|
|
2548
|
+
|
|
2549
|
+
<pre><code class="highlight language-c"><span class="cp">#include</span> <span class="cpf"><apex/apex.h></span><span class="cp">
|
|
2550
|
+
#include</span> <span class="cpf"><stdio.h></span><span class="cp">
|
|
2551
|
+
#include</span> <span class="cpf"><string.h></span><span class="cp">
|
|
2552
|
+
</span>
|
|
2553
|
+
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
|
2554
|
+
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">markdown</span> <span class="o">=</span>
|
|
2555
|
+
<span class="s">"---</span><span class="se">\n</span><span class="s">"</span>
|
|
2556
|
+
<span class="s">"title: Test Document</span><span class="se">\n</span><span class="s">"</span>
|
|
2557
|
+
<span class="s">"author: John Doe</span><span class="se">\n</span><span class="s">"</span>
|
|
2558
|
+
<span class="s">"---</span><span class="se">\n</span><span class="s">"</span>
|
|
2559
|
+
<span class="s">"</span><span class="se">\n</span><span class="s">"</span>
|
|
2560
|
+
<span class="s">"# [%title]</span><span class="se">\n</span><span class="s">"</span>
|
|
2561
|
+
<span class="s">"</span><span class="se">\n</span><span class="s">"</span>
|
|
2562
|
+
<span class="s">"By [%author]</span><span class="se">\n</span><span class="s">"</span>
|
|
2563
|
+
<span class="s">"</span><span class="se">\n</span><span class="s">"</span>
|
|
2564
|
+
<span class="s">"This has **bold** and a [[WikiLink]].</span><span class="se">\n</span><span class="s">"</span>
|
|
2565
|
+
<span class="s">"</span><span class="se">\n</span><span class="s">"</span>
|
|
2566
|
+
<span class="s">"Math: $E = mc^2$</span><span class="se">\n</span><span class="s">"</span>
|
|
2567
|
+
<span class="s">"</span><span class="se">\n</span><span class="s">"</span>
|
|
2568
|
+
<span class="s">"1. Mixed markers</span><span class="se">\n</span><span class="s">"</span>
|
|
2569
|
+
<span class="s">"* Second item</span><span class="se">\n</span><span class="s">"</span>
|
|
2570
|
+
<span class="s">"</span><span class="se">\n</span><span class="s">"</span>
|
|
2571
|
+
<span class="s">"a. Alpha list</span><span class="se">\n</span><span class="s">"</span>
|
|
2572
|
+
<span class="s">"b. Second alpha</span><span class="se">\n</span><span class="s">"</span><span class="p">;</span>
|
|
2573
|
+
|
|
2574
|
+
<span class="c1">// Use unified mode with all features</span>
|
|
2575
|
+
<span class="n">apex_options</span> <span class="n">opts</span> <span class="o">=</span> <span class="n">apex_options_for_mode</span><span class="p">(</span><span class="n">APEX_MODE_UNIFIED</span><span class="p">);</span>
|
|
2576
|
+
<span class="c1">// Mixed markers and alpha lists are enabled by default in unified mode</span>
|
|
2577
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">pretty</span> <span class="o">=</span> <span class="nb">true</span><span class="p">;</span>
|
|
2578
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">standalone</span> <span class="o">=</span> <span class="nb">true</span><span class="p">;</span>
|
|
2579
|
+
<span class="n">opts</span><span class="p">.</span><span class="n">document_title</span> <span class="o">=</span> <span class="s">"Test Document"</span><span class="p">;</span>
|
|
2580
|
+
|
|
2581
|
+
<span class="c1">// Convert to <abbr title="Hypertext Markup Language">HTML</abbr></span>
|
|
2582
|
+
<span class="kt">char</span> <span class="o">*</span><span class="n">html</span> <span class="o">=</span> <span class="n">apex_markdown_to_html</span><span class="p">(</span><span class="n">markdown</span><span class="p">,</span> <span class="n">strlen</span><span class="p">(</span><span class="n">markdown</span><span class="p">),</span> <span class="o">&</span><span class="n">opts</span><span class="p">);</span>
|
|
2583
|
+
|
|
2584
|
+
<span class="k">if</span> <span class="p">(</span><span class="n">html</span><span class="p">)</span> <span class="p">{</span>
|
|
2585
|
+
<span class="n">printf</span><span class="p">(</span><span class="s">"%s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">html</span><span class="p">);</span>
|
|
2586
|
+
<span class="n">apex_free_string</span><span class="p">(</span><span class="n">html</span><span class="p">);</span>
|
|
2587
|
+
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
|
|
2588
|
+
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
|
|
2589
|
+
<span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Conversion failed</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span>
|
|
2590
|
+
<span class="k">return</span> <span class="mi">1</span><span class="p">;</span>
|
|
2591
|
+
<span class="p">}</span>
|
|
2592
|
+
<span class="p">}</span>
|
|
2593
|
+
</code></pre>
|
|
2594
|
+
|
|
2595
|
+
<h2 id="compiling-and-linking">
|
|
2596
|
+
Compiling and Linking
|
|
2597
|
+
</h2>
|
|
2598
|
+
|
|
2599
|
+
<h3 id="with-cmake">
|
|
2600
|
+
With CMake
|
|
2601
|
+
</h3>
|
|
2602
|
+
|
|
2603
|
+
<pre><code class="highlight language-cmake"><span class="c1"># In your CMakeLists.txt</span>
|
|
2604
|
+
<span class="nb">find_package</span><span class="p">(</span>apex REQUIRED<span class="p">)</span>
|
|
2605
|
+
<span class="nb">target_link_libraries</span><span class="p">(</span>your_app apex<span class="p">)</span>
|
|
2606
|
+
</code></pre>
|
|
2607
|
+
|
|
2608
|
+
<h3 id="manual-compilation">
|
|
2609
|
+
Manual Compilation
|
|
2610
|
+
</h3>
|
|
2611
|
+
|
|
2612
|
+
<pre><code class="highlight language-bash"><span class="c"># Compile</span>
|
|
2613
|
+
gcc <span class="nt">-c</span> <span class="nt">-I</span>/usr/local/include your_app.c
|
|
2614
|
+
|
|
2615
|
+
<span class="c"># Link</span>
|
|
2616
|
+
gcc your_app.o <span class="nt">-L</span>/usr/local/lib <span class="nt">-lapex</span> <span class="nt">-o</span> your_app
|
|
2617
|
+
|
|
2618
|
+
<span class="c"># Run (may need library path)</span>
|
|
2619
|
+
<span class="nv">DYLD_LIBRARY_PATH</span><span class="o">=</span>/usr/local/lib ./your_app <span class="c"># macOS</span>
|
|
2620
|
+
<span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/usr/local/lib ./your_app <span class="c"># Linux</span>
|
|
2621
|
+
</code></pre>
|
|
2622
|
+
|
|
2623
|
+
<h3 id="static-linking">
|
|
2624
|
+
Static Linking
|
|
2625
|
+
</h3>
|
|
2626
|
+
|
|
2627
|
+
<pre><code class="highlight language-bash">gcc your_app.c <span class="nt">-I</span>/usr/local/include <span class="nt">-L</span>/usr/local/lib <span class="nt">-lapex</span> <span class="nt">-static</span> <span class="nt">-o</span> your_app
|
|
2628
|
+
</code></pre>
|
|
2629
|
+
|
|
2630
|
+
<h2 id="thread-safety">
|
|
2631
|
+
Thread Safety
|
|
2632
|
+
</h2>
|
|
2633
|
+
|
|
2634
|
+
<p>
|
|
2635
|
+
Apex is thread-safe as long as:
|
|
2636
|
+
</p>
|
|
2637
|
+
|
|
2638
|
+
<ol>
|
|
2639
|
+
|
|
2640
|
+
<li>
|
|
2641
|
+
Each thread uses its own <code>apex_options</code> structure
|
|
2642
|
+
</li>
|
|
2643
|
+
|
|
2644
|
+
<li>
|
|
2645
|
+
Document nodes are not shared between threads
|
|
2646
|
+
</li>
|
|
2647
|
+
|
|
2648
|
+
<li>
|
|
2649
|
+
The conversion function can be called from multiple threads simultaneously
|
|
2650
|
+
</li>
|
|
2651
|
+
|
|
2652
|
+
</ol>
|
|
2653
|
+
|
|
2654
|
+
<p>
|
|
2655
|
+
<strong> Example:</strong>
|
|
2656
|
+
</p>
|
|
2657
|
+
|
|
2658
|
+
<pre><code class="highlight language-c"> <span class="n">Thread</span><span class="o">-</span><span class="n">safe</span><span class="o">:</span> <span class="n">each</span> <span class="kr">thread</span> <span class="n">has</span> <span class="n">its</span> <span class="n">own</span> <span class="n">options</span>
|
|
2659
|
+
<span class="kt">void</span> <span class="o">*</span><span class="nf">thread_func</span><span class="p">(</span><span class="kt">void</span> <span class="o">*</span><span class="n">arg</span><span class="p">)</span> <span class="p">{</span>
|
|
2660
|
+
<span class="n">apex_options</span> <span class="n">opts</span> <span class="o">=</span> <span class="n">apex_options_default</span><span class="p">();</span>
|
|
2661
|
+
<span class="kt">char</span> <span class="o">*</span><span class="n">html</span> <span class="o">=</span> <span class="n">apex_markdown_to_html</span><span class="p">(</span><span class="n">markdown</span><span class="p">,</span> <span class="n">len</span><span class="p">,</span> <span class="o">&</span><span class="n">opts</span><span class="p">);</span>
|
|
2662
|
+
<span class="c1">// Use html...</span>
|
|
2663
|
+
<span class="n">apex_free_string</span><span class="p">(</span><span class="n">html</span><span class="p">);</span>
|
|
2664
|
+
<span class="k">return</span> <span class="nb">NULL</span><span class="p">;</span>
|
|
2665
|
+
<span class="p">}</span>
|
|
2666
|
+
</code></pre>
|
|
2667
|
+
|
|
2668
|
+
<h2 id="memory-management">
|
|
2669
|
+
Memory Management
|
|
2670
|
+
</h2>
|
|
2671
|
+
|
|
2672
|
+
<ul>
|
|
2673
|
+
|
|
2674
|
+
<li>
|
|
2675
|
+
All strings returned by Apex must be freed with <code>apex_free_string()</code>
|
|
2676
|
+
</li>
|
|
2677
|
+
|
|
2678
|
+
<li>
|
|
2679
|
+
<code>apex_options</code> structures are typically stack-allocated (no freeing needed)
|
|
2680
|
+
</li>
|
|
2681
|
+
|
|
2682
|
+
<li>
|
|
2683
|
+
Safe to call <code>apex_free_string(NULL)</code>
|
|
2684
|
+
</li>
|
|
2685
|
+
|
|
2686
|
+
<li>
|
|
2687
|
+
Always check return values before use
|
|
2688
|
+
</li>
|
|
2689
|
+
|
|
2690
|
+
</ul>
|
|
2691
|
+
|
|
2692
|
+
<h2 id="error-handling">
|
|
2693
|
+
Error Handling
|
|
2694
|
+
</h2>
|
|
2695
|
+
|
|
2696
|
+
<ul>
|
|
2697
|
+
|
|
2698
|
+
<li>
|
|
2699
|
+
Functions return <code>NULL</code> or empty strings on error
|
|
2700
|
+
</li>
|
|
2701
|
+
|
|
2702
|
+
<li>
|
|
2703
|
+
Check return values before use
|
|
2704
|
+
</li>
|
|
2705
|
+
|
|
2706
|
+
<li>
|
|
2707
|
+
Errors are generally due to:
|
|
2708
|
+
<ul>
|
|
2709
|
+
|
|
2710
|
+
<li>
|
|
2711
|
+
Memory allocation failures
|
|
2712
|
+
</li>
|
|
2713
|
+
|
|
2714
|
+
<li>
|
|
2715
|
+
Invalid input
|
|
2716
|
+
</li>
|
|
2717
|
+
|
|
2718
|
+
<li>
|
|
2719
|
+
Missing dependencies
|
|
2720
|
+
</li>
|
|
2721
|
+
|
|
2722
|
+
</ul>
|
|
2723
|
+
|
|
2724
|
+
</li>
|
|
2725
|
+
|
|
2726
|
+
</ul>
|
|
2727
|
+
|
|
2728
|
+
<p>
|
|
2729
|
+
<strong> Example:</strong>
|
|
2730
|
+
</p>
|
|
2731
|
+
|
|
2732
|
+
<pre><code class="highlight language-c"><span class="kt">char</span> <span class="o">*</span><span class="n">html</span> <span class="o">=</span> <span class="n">apex_markdown_to_html</span><span class="p">(</span><span class="n">markdown</span><span class="p">,</span> <span class="n">len</span><span class="p">,</span> <span class="o">&</span><span class="n">opts</span><span class="p">);</span>
|
|
2733
|
+
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">html</span><span class="p">)</span> <span class="p">{</span>
|
|
2734
|
+
<span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Conversion failed</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span>
|
|
2735
|
+
<span class="k">return</span> <span class="mi">1</span><span class="p">;</span>
|
|
2736
|
+
<span class="p">}</span>
|
|
2737
|
+
<span class="n">Use</span> <span class="n">html</span><span class="p">...</span>
|
|
2738
|
+
<span class="n">apex_free_string</span><span class="p">(</span><span class="n">html</span><span class="p">);</span>
|
|
2739
|
+
</code></pre>
|
|
2740
|
+
|
|
2741
|
+
<h2 id="performance-tips">
|
|
2742
|
+
Performance Tips
|
|
2743
|
+
</h2>
|
|
2744
|
+
|
|
2745
|
+
<ol>
|
|
2746
|
+
|
|
2747
|
+
<li>
|
|
2748
|
+
<strong> Reuse options</strong>: Create <code>apex_options</code> once and reuse for multiple conversions
|
|
2749
|
+
</li>
|
|
2750
|
+
|
|
2751
|
+
<li>
|
|
2752
|
+
<strong> Provide accurate length</strong>: Avoid unnecessary <code>strlen()</code> calls
|
|
2753
|
+
</li>
|
|
2754
|
+
|
|
2755
|
+
<li>
|
|
2756
|
+
<strong> Disable unused features</strong>: Turn off extensions you don’t need
|
|
2757
|
+
</li>
|
|
2758
|
+
|
|
2759
|
+
<li>
|
|
2760
|
+
<strong> Batch processing</strong>: Process multiple documents in parallel (thread-safe)
|
|
2761
|
+
</li>
|
|
2762
|
+
|
|
2763
|
+
</ol>
|
|
2764
|
+
|
|
2765
|
+
<p>
|
|
2766
|
+
<strong> Example:</strong>
|
|
2767
|
+
</p>
|
|
2768
|
+
|
|
2769
|
+
<pre><code class="highlight language-c"> <span class="nl">Good:</span> <span class="n">reuse</span> <span class="n">options</span>
|
|
2770
|
+
<span class="n">apex_options</span> <span class="n">opts</span> <span class="o">=</span> <span class="n">apex_options_default</span><span class="p">();</span>
|
|
2771
|
+
<span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">count</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
|
|
2772
|
+
<span class="kt">char</span> <span class="o">*</span><span class="n">html</span> <span class="o">=</span> <span class="n">apex_markdown_to_html</span><span class="p">(</span><span class="n">docs</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">lens</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="o">&</span><span class="n">opts</span><span class="p">);</span>
|
|
2773
|
+
<span class="c1">// Process...</span>
|
|
2774
|
+
<span class="n">apex_free_string</span><span class="p">(</span><span class="n">html</span><span class="p">);</span>
|
|
2775
|
+
<span class="p">}</span>
|
|
2776
|
+
</code></pre>
|
|
2777
|
+
|
|
2778
|
+
<h2 id="related">
|
|
2779
|
+
Related
|
|
2780
|
+
</h2>
|
|
2781
|
+
|
|
2782
|
+
<ul>
|
|
2783
|
+
|
|
2784
|
+
<li>
|
|
2785
|
+
|
|
2786
|
+
<p>
|
|
2787
|
+
<a href="Xcode-Integration.html"> Xcode Integration</a> - Using Apex in Xcode projects
|
|
2788
|
+
</p>
|
|
2789
|
+
|
|
2790
|
+
</li>
|
|
2791
|
+
|
|
2792
|
+
<li>
|
|
2793
|
+
|
|
2794
|
+
<p>
|
|
2795
|
+
<a href="Modes.html"> Modes</a> - Understanding processor modes
|
|
2796
|
+
</p>
|
|
2797
|
+
|
|
2798
|
+
</li>
|
|
2799
|
+
|
|
2800
|
+
<li>
|
|
2801
|
+
|
|
2802
|
+
<p>
|
|
2803
|
+
<a href="Header-IDs.html"> Header IDs</a> - Header ID generation options
|
|
2804
|
+
</p>
|
|
2805
|
+
|
|
2806
|
+
<pre><code class="highlight "> # Glob include (first matching .md file)
|
|
2807
|
+
</code></pre>
|
|
2808
|
+
|
|
2809
|
+
</li>
|
|
2810
|
+
|
|
2811
|
+
</ul>
|
|
2812
|
+
|
|
2813
|
+
<p>
|
|
2814
|
+
{{c?de.py}} # ? wildcard (e.g. resolves to code.py)
|
|
2815
|
+
</p>
|
|
2816
|
+
|
|
2817
|
+
<pre><code class="highlight ">
|
|
2818
|
+
`{{file.*}}` implements MultiMarkdown-style wildcard resolution, trying common extensions in a preferred order.
|
|
2819
|
+
Patterns containing `*`, `?`, `[]`, or `{}` are treated as glob patterns and resolved relative to the current transclude base (see metadata `transclude base`).
|
|
2820
|
+
|
|
2821
|
+
**iA Writer syntax:**
|
|
2822
|
+
```markdown
|
|
2823
|
+
/image.png # Intelligent include (detects type)
|
|
2824
|
+
/code.py # Auto-detects as code block
|
|
2825
|
+
/document.md # Auto-detects as Markdown
|
|
2826
|
+
</code></pre>
|
|
2827
|
+
|
|
2828
|
+
<p>
|
|
2829
|
+
CSV and TSV files automatically convert to tables.
|
|
2830
|
+
</p>
|
|
2831
|
+
|
|
2832
|
+
<h3 id="address-syntax-for-file-includes">
|
|
2833
|
+
Address Syntax for File Includes
|
|
2834
|
+
</h3>
|
|
2835
|
+
|
|
2836
|
+
<p>
|
|
2837
|
+
File includes support mmark-style address syntax to include specific line ranges or sections. This works with <code>{{file}}</code> and <code>, </code>, `` syntaxes, but <strong>not</strong> with iA Writer <code>/file</code> syntax.
|
|
2838
|
+
</p>
|
|
2839
|
+
|
|
2840
|
+
<p>
|
|
2841
|
+
<strong> Line number ranges:</strong>
|
|
2842
|
+
</p>
|
|
2843
|
+
|
|
2844
|
+
<pre><code class="highlight language-markdown">{{file.md}}[3,5] # Include lines 3 to 5 (exclusive of 5)
|
|
2845
|
+
{{file.md}}[3,] # Include from line 3 to end of file
|
|
2846
|
+
# Include lines 1 to 10 in Marked syntax
|
|
2847
|
+
# Include lines 5 to 15 in code block
|
|
2848
|
+
</code></pre>
|
|
2849
|
+
|
|
2850
|
+
<p>
|
|
2851
|
+
<strong> Regular expression ranges:</strong>
|
|
2852
|
+
</p>
|
|
2853
|
+
|
|
2854
|
+
<pre><code class="highlight language-markdown">{{file.md}}[/START/,/END/] # Include lines between regex matches
|
|
2855
|
+
{{file.md}}[/<span class="nt"><sup></span>##<span class="nt"></sup></span> /,/<span class="nt"><sup></span>##<span class="nt"></sup></span> /] # Include between heading markers
|
|
2856
|
+
# Include from function to closing brace
|
|
2857
|
+
</code></pre>
|
|
2858
|
+
|
|
2859
|
+
<p>
|
|
2860
|
+
<strong> Prefix option:</strong>
|
|
2861
|
+
</p>
|
|
2862
|
+
|
|
2863
|
+
<pre><code class="highlight language-markdown">{{file.md}}[3,5;prefix="C: "] # Prefix each line with "C: "
|
|
2864
|
+
{{code.py}}[1,10;prefix=" "] # Indent included lines
|
|
2865
|
+
</code></pre>
|
|
2866
|
+
|
|
2867
|
+
<p>
|
|
2868
|
+
<strong> Combined examples:</strong>
|
|
2869
|
+
</p>
|
|
2870
|
+
|
|
2871
|
+
<pre><code class="highlight language-markdown"><span class="gh"># Include lines 10-20 with prefix</span>
|
|
2872
|
+
{{example.py}}[10,20;prefix=" "]
|
|
2873
|
+
|
|
2874
|
+
<span class="gh"># Include from regex match to end</span>
|
|
2875
|
+
{{config.md}}[/<span class="nt"><sup></span>##<span class="nt"></sup></span> Config/,]
|
|
2876
|
+
|
|
2877
|
+
<span class="gh"># Include between patterns with prefix</span>
|
|
2878
|
+
{{script.sh}}[/# START/,/# END/;prefix="# "]
|
|
2879
|
+
</code></pre>
|
|
2880
|
+
|
|
2881
|
+
<p>
|
|
2882
|
+
<strong> Notes:</strong>
|
|
2883
|
+
</p>
|
|
2884
|
+
|
|
2885
|
+
<ul>
|
|
2886
|
+
|
|
2887
|
+
<li>
|
|
2888
|
+
Line numbers are 1-based
|
|
2889
|
+
</li>
|
|
2890
|
+
|
|
2891
|
+
<li>
|
|
2892
|
+
End line is exclusive (e.g., <code>[3,5]</code> includes lines 3 and 4, not 5)
|
|
2893
|
+
</li>
|
|
2894
|
+
|
|
2895
|
+
<li>
|
|
2896
|
+
Regex patterns use POSIX extended regular expressions
|
|
2897
|
+
</li>
|
|
2898
|
+
|
|
2899
|
+
<li>
|
|
2900
|
+
If start pattern is not found, empty content is returned
|
|
2901
|
+
</li>
|
|
2902
|
+
|
|
2903
|
+
<li>
|
|
2904
|
+
If end pattern is not found, content from start to end of file is included
|
|
2905
|
+
</li>
|
|
2906
|
+
|
|
2907
|
+
<li>
|
|
2908
|
+
Prefix is applied to each included line
|
|
2909
|
+
</li>
|
|
2910
|
+
|
|
2911
|
+
</ul>
|
|
2912
|
+
|
|
2913
|
+
<h3 id="address-syntax-for-file-includes">
|
|
2914
|
+
Address Syntax for File Includes
|
|
2915
|
+
</h3>
|
|
2916
|
+
|
|
2917
|
+
<p>
|
|
2918
|
+
Apex supports mmark-style address syntax for specifying line ranges and applying prefixes to included files. This works with <code>{{file}}</code> and `` syntaxes (but not iA Writer <code>/file</code> syntax).
|
|
2919
|
+
</p>
|
|
2920
|
+
|
|
2921
|
+
<p>
|
|
2922
|
+
<strong> Line number ranges:</strong>
|
|
2923
|
+
</p>
|
|
2924
|
+
|
|
2925
|
+
<pre><code class="highlight language-markdown">{{file.md}}[3,5] # Include lines 3 to 5 (exclusive of 5)
|
|
2926
|
+
{{file.md}}[3,] # Include from line 3 to end of file
|
|
2927
|
+
# Include lines 1 to 10
|
|
2928
|
+
# Include lines 5 to 15 from code file
|
|
2929
|
+
</code></pre>
|
|
2930
|
+
|
|
2931
|
+
<p>
|
|
2932
|
+
<strong> Regular expression ranges:</strong>
|
|
2933
|
+
</p>
|
|
2934
|
+
|
|
2935
|
+
<pre><code class="highlight language-markdown">{{file.md}}[/START/,/END/] # Include lines between regex matches
|
|
2936
|
+
{{file.md}}[/<span class="nt"><sup></span>##<span class="nt"></sup></span> Section/,/<span class="nt"><sup></span>##<span class="nt"></sup></span> /] # Include from section to next section
|
|
2937
|
+
# Include between BEGIN and END markers
|
|
2938
|
+
</code></pre>
|
|
2939
|
+
|
|
2940
|
+
<p>
|
|
2941
|
+
<strong> Prefix option:</strong>
|
|
2942
|
+
</p>
|
|
2943
|
+
|
|
2944
|
+
<pre><code class="highlight language-markdown">{{file.md}}[3,5;prefix="C: "] # Prefix each line with "C: "
|
|
2945
|
+
{{file.md}}[prefix="> "] # Prefix all lines with "> "
|
|
2946
|
+
# Prefix with 4 spaces (indentation)
|
|
2947
|
+
</code></pre>
|
|
2948
|
+
|
|
2949
|
+
<p>
|
|
2950
|
+
<strong> Combined examples:</strong>
|
|
2951
|
+
</p>
|
|
2952
|
+
|
|
2953
|
+
<pre><code class="highlight language-markdown">{{config.py}}[/def setup/,/<span class="nt"><sup></span>def<span class="nt"></sup></span> /;prefix="# "]
|
|
2954
|
+
<span class="gh"># Includes lines from "def setup" to next "def", with "# " prefix</span>
|
|
2955
|
+
|
|
2956
|
+
<span class="gh"># Includes lines 10-20 with blockquote prefix</span>
|
|
2957
|
+
</code></pre>
|
|
2958
|
+
|
|
2959
|
+
<p>
|
|
2960
|
+
<strong> Notes:</strong>
|
|
2961
|
+
</p>
|
|
2962
|
+
|
|
2963
|
+
<ul>
|
|
2964
|
+
|
|
2965
|
+
<li>
|
|
2966
|
+
Line numbers are 1-based
|
|
2967
|
+
</li>
|
|
2968
|
+
|
|
2969
|
+
<li>
|
|
2970
|
+
End line is exclusive (e.g., <code>[3,5]</code> includes lines 3 and 4, not 5)
|
|
2971
|
+
</li>
|
|
2972
|
+
|
|
2973
|
+
<li>
|
|
2974
|
+
Regex patterns use POSIX extended regular expressions
|
|
2975
|
+
</li>
|
|
2976
|
+
|
|
2977
|
+
<li>
|
|
2978
|
+
Prefix is applied to each included line
|
|
2979
|
+
</li>
|
|
2980
|
+
|
|
2981
|
+
<li>
|
|
2982
|
+
Address syntax does not apply to iA Writer syntax (<code>/file</code>)
|
|
2983
|
+
</li>
|
|
2984
|
+
|
|
2985
|
+
</ul>
|
|
2986
|
+
|
|
2987
|
+
<h2 id="metadata">
|
|
2988
|
+
Metadata
|
|
2989
|
+
</h2>
|
|
2990
|
+
|
|
2991
|
+
<h3 id="yaml-front-matter">
|
|
2992
|
+
YAML Front Matter
|
|
2993
|
+
</h3>
|
|
2994
|
+
|
|
2995
|
+
<pre><code class="highlight language-yaml"><span class="nn">---</span>
|
|
2996
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">My Document</span>
|
|
2997
|
+
<span class="na">author</span><span class="pi">:</span> <span class="s">John Doe</span>
|
|
2998
|
+
<span class="na">date</span><span class="pi">:</span> <span class="s">2025-12-06</span>
|
|
2999
|
+
<span class="nn">---</span>
|
|
3000
|
+
</code></pre>
|
|
3001
|
+
|
|
3002
|
+
<h3 id="multimarkdown-metadata">
|
|
3003
|
+
MultiMarkdown Metadata
|
|
3004
|
+
</h3>
|
|
3005
|
+
|
|
3006
|
+
<pre><code class="highlight language-markdown">Title: My Document
|
|
3007
|
+
Author: John Doe
|
|
3008
|
+
Date: 2025-12-06
|
|
3009
|
+
|
|
3010
|
+
</code></pre>
|
|
3011
|
+
|
|
3012
|
+
<h3 id="pandoc-title-block">
|
|
3013
|
+
Pandoc Title Block
|
|
3014
|
+
</h3>
|
|
3015
|
+
|
|
3016
|
+
<pre><code class="highlight language-markdown">% My Document
|
|
3017
|
+
% John Doe
|
|
3018
|
+
% 2025-12-06
|
|
3019
|
+
</code></pre>
|
|
3020
|
+
|
|
3021
|
+
<h3 id="metadata-variables">
|
|
3022
|
+
Metadata Variables
|
|
3023
|
+
</h3>
|
|
3024
|
+
|
|
3025
|
+
<p>
|
|
3026
|
+
Use <code>[%key]</code> to insert metadata values anywhere:
|
|
3027
|
+
</p>
|
|
3028
|
+
|
|
3029
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
3030
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">Apex Guide</span>
|
|
3031
|
+
<span class="na">version</span><span class="pi">:</span> <span class="s">0.1.0</span>
|
|
3032
|
+
<span class="nn">---</span>
|
|
3033
|
+
|
|
3034
|
+
<span class="gh"># [%title]</span>
|
|
3035
|
+
|
|
3036
|
+
Version: [%version]
|
|
3037
|
+
</code></pre>
|
|
3038
|
+
|
|
3039
|
+
<p>
|
|
3040
|
+
You can also transform metadata values using the <code>[%key:transform]</code> syntax. See <a href="Metadata-Transforms.html">Metadata Transforms</a> for a complete guide to available transforms.
|
|
3041
|
+
</p>
|
|
3042
|
+
|
|
3043
|
+
<p>
|
|
3044
|
+
<strong> External Metadata Sources:</strong>
|
|
3045
|
+
</p>
|
|
3046
|
+
|
|
3047
|
+
<p>
|
|
3048
|
+
Metadata can also be loaded from external files or specified on the command line:
|
|
3049
|
+
</p>
|
|
3050
|
+
|
|
3051
|
+
<ul>
|
|
3052
|
+
|
|
3053
|
+
<li>
|
|
3054
|
+
<strong><code>--meta-file FILE</code></strong>: Load metadata from an external file (YAML, <abbr title="MultiMarkdown">MMD</abbr>, or Pandoc format, auto-detected)
|
|
3055
|
+
</li>
|
|
3056
|
+
|
|
3057
|
+
<li>
|
|
3058
|
+
<strong><code>--meta KEY=VALUE</code></strong>: Set metadata from the command line (supports multiple flags and comma-separated pairs)
|
|
3059
|
+
</li>
|
|
3060
|
+
|
|
3061
|
+
</ul>
|
|
3062
|
+
|
|
3063
|
+
<p>
|
|
3064
|
+
Metadata precedence (highest to lowest):
|
|
3065
|
+
</p>
|
|
3066
|
+
|
|
3067
|
+
<ol>
|
|
3068
|
+
|
|
3069
|
+
<li>
|
|
3070
|
+
Command-line metadata (<code>--meta</code>)
|
|
3071
|
+
</li>
|
|
3072
|
+
|
|
3073
|
+
<li>
|
|
3074
|
+
Document metadata (in the document)
|
|
3075
|
+
</li>
|
|
3076
|
+
|
|
3077
|
+
<li>
|
|
3078
|
+
File metadata (<code>--meta-file</code>)
|
|
3079
|
+
</li>
|
|
3080
|
+
|
|
3081
|
+
</ol>
|
|
3082
|
+
|
|
3083
|
+
<p>
|
|
3084
|
+
<strong> Reusable Metadata Files:</strong>
|
|
3085
|
+
</p>
|
|
3086
|
+
|
|
3087
|
+
<p>
|
|
3088
|
+
You can create reusable metadata files for common settings like language and quotes language. This is especially useful for maintaining consistent settings across multiple documents.
|
|
3089
|
+
</p>
|
|
3090
|
+
|
|
3091
|
+
<p>
|
|
3092
|
+
<strong> Example metadata file (<code>lang-fr.yml</code>):</strong>
|
|
3093
|
+
</p>
|
|
3094
|
+
|
|
3095
|
+
<pre><code class="highlight language-yaml"><span class="nn">---</span>
|
|
3096
|
+
<span class="na">language</span><span class="pi">:</span> <span class="s">fr</span>
|
|
3097
|
+
<span class="na">quoteslanguage</span><span class="pi">:</span> <span class="s">french</span>
|
|
3098
|
+
<span class="nn">---</span>
|
|
3099
|
+
</code></pre>
|
|
3100
|
+
|
|
3101
|
+
<p>
|
|
3102
|
+
<strong> Note:</strong> In YAML, keys with spaces must be quoted (e.g., <code>"Quotes Language": french</code>). Since Apex normalizes metadata keys (removes spaces, case-insensitive), you can use keys without spaces for cleaner YAML syntax. Both <code>quoteslanguage</code> and <code>"Quotes Language"</code> will work.
|
|
3103
|
+
</p>
|
|
3104
|
+
|
|
3105
|
+
<p>
|
|
3106
|
+
<strong> Example metadata file (<code>lang-de.mmd</code>):</strong>
|
|
3107
|
+
</p>
|
|
3108
|
+
|
|
3109
|
+
<pre><code class="highlight ">Language: de
|
|
3110
|
+
Quotes Language: german
|
|
3111
|
+
</code></pre>
|
|
3112
|
+
|
|
3113
|
+
<p>
|
|
3114
|
+
<strong> Note:</strong> MultiMarkdown format allows spaces in keys, so <code>Quotes Language</code> works without quotes.
|
|
3115
|
+
</p>
|
|
3116
|
+
|
|
3117
|
+
<p>
|
|
3118
|
+
<strong> Usage:</strong>
|
|
3119
|
+
</p>
|
|
3120
|
+
|
|
3121
|
+
<pre><code class="highlight language-bash"><span class="c"># Use French language settings for all documents</span>
|
|
3122
|
+
apex document1.md <span class="nt">--meta-file</span> lang-fr.yml
|
|
3123
|
+
apex document2.md <span class="nt">--meta-file</span> lang-fr.yml
|
|
3124
|
+
</code></pre>
|
|
3125
|
+
|
|
3126
|
+
<p>
|
|
3127
|
+
<strong> Benefits:</strong>
|
|
3128
|
+
</p>
|
|
3129
|
+
|
|
3130
|
+
<ul>
|
|
3131
|
+
|
|
3132
|
+
<li>
|
|
3133
|
+
<strong> Consistency</strong>: Ensure all documents use the same language settings
|
|
3134
|
+
</li>
|
|
3135
|
+
|
|
3136
|
+
<li>
|
|
3137
|
+
<strong> Reusability</strong>: Define language and quotes language once, use across many documents
|
|
3138
|
+
</li>
|
|
3139
|
+
|
|
3140
|
+
<li>
|
|
3141
|
+
<strong> Maintainability</strong>: Update language settings in one place
|
|
3142
|
+
</li>
|
|
3143
|
+
|
|
3144
|
+
<li>
|
|
3145
|
+
<strong> Automatic fallback</strong>: If <code>Quotes Language</code> is not specified, it automatically uses the <code>language</code> value
|
|
3146
|
+
</li>
|
|
3147
|
+
|
|
3148
|
+
</ul>
|
|
3149
|
+
|
|
3150
|
+
<p>
|
|
3151
|
+
<strong> Controlling Command-Line Options via Metadata:</strong>
|
|
3152
|
+
</p>
|
|
3153
|
+
|
|
3154
|
+
<p>
|
|
3155
|
+
Most command-line options can be controlled via metadata, allowing per-document configuration. Boolean options accept <code>true</code>/<code>false</code>, <code>yes</code>/<code>no</code>, or <code>1</code>/<code>0</code> (case-insensitive). String options use the value directly.
|
|
3156
|
+
</p>
|
|
3157
|
+
|
|
3158
|
+
<p>
|
|
3159
|
+
<strong> Example:</strong>
|
|
3160
|
+
</p>
|
|
3161
|
+
|
|
3162
|
+
<pre><code class="highlight language-yaml"><span class="nn">---</span>
|
|
3163
|
+
<span class="na">indices</span><span class="pi">:</span> <span class="kc">false</span>
|
|
3164
|
+
<span class="na">wikilinks</span><span class="pi">:</span> <span class="kc">true</span>
|
|
3165
|
+
<span class="na">bibliography</span><span class="pi">:</span> <span class="s">references.bib</span>
|
|
3166
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">My Research Paper</span>
|
|
3167
|
+
<span class="na">pretty</span><span class="pi">:</span> <span class="kc">true</span>
|
|
3168
|
+
<span class="na">standalone</span><span class="pi">:</span> <span class="kc">true</span>
|
|
3169
|
+
<span class="nn">---</span>
|
|
3170
|
+
</code></pre>
|
|
3171
|
+
|
|
3172
|
+
<p>
|
|
3173
|
+
This enables batch processing where each file can have its own configuration. See <a href="Command-Line-Options.html">Command Line Options</a> for complete documentation of metadata options and which options can be controlled via metadata.
|
|
3174
|
+
</p>
|
|
3175
|
+
|
|
3176
|
+
<h2 id="abbreviations">
|
|
3177
|
+
Abbreviations
|
|
3178
|
+
</h2>
|
|
3179
|
+
|
|
3180
|
+
<p>
|
|
3181
|
+
<strong> Classic <abbr title="MultiMarkdown">MMD</abbr> syntax:</strong>
|
|
3182
|
+
</p>
|
|
3183
|
+
|
|
3184
|
+
<pre><code class="highlight language-markdown">
|
|
3185
|
+
<span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"Hypertext Markup Language"</span><span class="nt">></span>HTML<span class="nt"></abbr></span> and <span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"Cascading Style Sheets"</span><span class="nt">></span>CSS<span class="nt"></abbr></span> are essential.
|
|
3186
|
+
</code></pre>
|
|
3187
|
+
|
|
3188
|
+
<p>
|
|
3189
|
+
<strong><abbr title="MultiMarkdown"> MMD</abbr> 6 reference syntax:</strong>
|
|
3190
|
+
</p>
|
|
3191
|
+
|
|
3192
|
+
<pre><code class="highlight language-markdown">
|
|
3193
|
+
Using <span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"MultiMarkdown"</span><span class="nt">></span>MMD<span class="nt"></abbr></span> here and <span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"MultiMarkdown"</span><span class="nt">></span>MMD<span class="nt"></abbr></span> again.
|
|
3194
|
+
</code></pre>
|
|
3195
|
+
|
|
3196
|
+
<p>
|
|
3197
|
+
<strong><abbr title="MultiMarkdown"> MMD</abbr> 6 inline syntax:</strong>
|
|
3198
|
+
</p>
|
|
3199
|
+
|
|
3200
|
+
<pre><code class="highlight language-markdown">This is MD and <span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"Cascading Style Sheets"</span><span class="nt">></span>CSS<span class="nt"></abbr></span>.
|
|
3201
|
+
</code></pre>
|
|
3202
|
+
|
|
3203
|
+
<h2 id="inline-attribute-lists-ial">
|
|
3204
|
+
Inline Attribute Lists (IAL)
|
|
3205
|
+
</h2>
|
|
3206
|
+
|
|
3207
|
+
<p>
|
|
3208
|
+
Kramdown and Pandoc syntax for adding <abbr title="Hypertext Markup Language">HTML</abbr> attributes (IDs, classes, and custom key-value pairs) to Markdown elements.
|
|
3209
|
+
</p>
|
|
3210
|
+
|
|
3211
|
+
<p>
|
|
3212
|
+
Apex supports both <strong>Kramdown-style IALs</strong> (<code>{: ...}</code>) and <strong>Pandoc-style IALs</strong> (<code>{#id .class}</code>). Both formats work identically throughout the document.
|
|
3213
|
+
</p>
|
|
3214
|
+
|
|
3215
|
+
<p>
|
|
3216
|
+
<strong> Block-level IALs</strong> appear on the line immediately after the element:
|
|
3217
|
+
</p>
|
|
3218
|
+
|
|
3219
|
+
<pre><code class="highlight language-markdown"><span class="gh"># Header</span>
|
|
3220
|
+
|
|
3221
|
+
{: #custom-id}
|
|
3222
|
+
|
|
3223
|
+
<span class="gh"># Another Header</span>
|
|
3224
|
+
|
|
3225
|
+
{#custom-id-2 .highlight}
|
|
3226
|
+
|
|
3227
|
+
Paragraph with class.
|
|
3228
|
+
|
|
3229
|
+
{: .important}
|
|
3230
|
+
|
|
3231
|
+
<span class="gu">## Another Header</span>
|
|
3232
|
+
|
|
3233
|
+
{: #section-2 .highlight title="Section Title" lang="en"}
|
|
3234
|
+
</code></pre>
|
|
3235
|
+
|
|
3236
|
+
<p>
|
|
3237
|
+
<strong> Inline IALs</strong> appear immediately after the element within the paragraph:
|
|
3238
|
+
</p>
|
|
3239
|
+
|
|
3240
|
+
<pre><code class="highlight language-markdown">Here's a <span class="p">[</span><span class="nv">styled link</span><span class="p">](</span><span class="sx">url</span><span class="p">)</span>{:.button} with a class.
|
|
3241
|
+
|
|
3242
|
+
Here's a <span class="p">[</span><span class="nv">Pandoc-style link</span><span class="p">](</span><span class="sx">url</span><span class="p">)</span>{#link-id .button} with attributes.
|
|
3243
|
+
|
|
3244
|
+
This has <span class="gs">**bold text**</span>{:.bold-style} and <span class="ge">*italic text*</span>{:.italic-style}.
|
|
3245
|
+
</code></pre>
|
|
3246
|
+
|
|
3247
|
+
<p>
|
|
3248
|
+
<strong> Key-value pairs</strong> allow custom attributes:
|
|
3249
|
+
</p>
|
|
3250
|
+
|
|
3251
|
+
<pre><code class="highlight language-markdown">Paragraph.
|
|
3252
|
+
|
|
3253
|
+
{: title="Important Note" lang="en" data-custom="value"}
|
|
3254
|
+
|
|
3255
|
+
<span class="p">[</span><span class="nv">Link</span><span class="p">](</span><span class="sx">url</span><span class="p">)</span>{:rel="nofollow" target="_blank"}
|
|
3256
|
+
</code></pre>
|
|
3257
|
+
|
|
3258
|
+
<p>
|
|
3259
|
+
<strong> Attribute List Definitions (ALDs)</strong> define reusable attribute sets:
|
|
3260
|
+
</p>
|
|
3261
|
+
|
|
3262
|
+
<pre><code class="highlight language-markdown"><span class="gh"># Header 1</span>
|
|
3263
|
+
|
|
3264
|
+
{:my-style}
|
|
3265
|
+
|
|
3266
|
+
<span class="gh"># Header 2</span>
|
|
3267
|
+
|
|
3268
|
+
{:my-style}
|
|
3269
|
+
|
|
3270
|
+
</code></pre>
|
|
3271
|
+
|
|
3272
|
+
<p>
|
|
3273
|
+
<strong> ALD references can be combined with additional attributes</strong> in the same IAL. Additional attributes override or extend the ALD:
|
|
3274
|
+
</p>
|
|
3275
|
+
|
|
3276
|
+
<pre><code class="highlight language-markdown">
|
|
3277
|
+
<span class="gh"># Heading 1</span>
|
|
3278
|
+
|
|
3279
|
+
{:base-style}
|
|
3280
|
+
|
|
3281
|
+
<span class="gh"># Heading 2</span>
|
|
3282
|
+
|
|
3283
|
+
{:base-style .class3}
|
|
3284
|
+
|
|
3285
|
+
<span class="gh"># Heading 3</span>
|
|
3286
|
+
|
|
3287
|
+
{:base-style #override-id}
|
|
3288
|
+
|
|
3289
|
+
<span class="gh"># Heading 4</span>
|
|
3290
|
+
|
|
3291
|
+
{:base-style .class3 rel="nofollow"}
|
|
3292
|
+
</code></pre>
|
|
3293
|
+
|
|
3294
|
+
<p>
|
|
3295
|
+
<strong> Behavior:</strong>
|
|
3296
|
+
</p>
|
|
3297
|
+
|
|
3298
|
+
<ul>
|
|
3299
|
+
|
|
3300
|
+
<li>
|
|
3301
|
+
<strong> Classes</strong>: Additional classes are appended to the ALD classes
|
|
3302
|
+
</li>
|
|
3303
|
+
|
|
3304
|
+
<li>
|
|
3305
|
+
<strong> IDs</strong>: If an ID is specified in the IAL, it overrides the ALD’s ID
|
|
3306
|
+
</li>
|
|
3307
|
+
|
|
3308
|
+
<li>
|
|
3309
|
+
<strong> Key-value attributes</strong>: If a key exists in both ALD and IAL, the IAL value overrides the ALD value
|
|
3310
|
+
</li>
|
|
3311
|
+
|
|
3312
|
+
</ul>
|
|
3313
|
+
|
|
3314
|
+
<p>
|
|
3315
|
+
For complete documentation with examples, see <a href="Inline-Attribute-Lists.html">Inline Attribute Lists</a>.
|
|
3316
|
+
</p>
|
|
3317
|
+
|
|
3318
|
+
<h2 id="table-of-contents">
|
|
3319
|
+
Table of Contents
|
|
3320
|
+
</h2>
|
|
3321
|
+
|
|
3322
|
+
<p>
|
|
3323
|
+
Multiple marker formats:
|
|
3324
|
+
</p>
|
|
3325
|
+
|
|
3326
|
+
<pre><code class="highlight language-markdown"><span class="c"><!--TOC--></span> # Basic TOC
|
|
3327
|
+
<span class="c"><!--TOC max2 min1--></span> # With depth control
|
|
3328
|
+
<span class="nt"><nav</span> <span class="na">class=</span><span class="s">"toc"</span><span class="nt">></span>
|
|
3329
|
+
<span class="nt"><ul></span>
|
|
3330
|
+
<span class="nt"><ul></span>
|
|
3331
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#basic-markdown"</span><span class="nt">></span>Basic Markdown<span class="nt"></a></li></span>
|
|
3332
|
+
<span class="nt"><ul></span>
|
|
3333
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#headers"</span><span class="nt">></span>Headers<span class="nt"></a></li></span>
|
|
3334
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#emphasis"</span><span class="nt">></span>Emphasis<span class="nt"></a></li></span>
|
|
3335
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#superscript-and-subscript"</span><span class="nt">></span>Superscript and Subscript<span class="nt"></a></li></span>
|
|
3336
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#lists"</span><span class="nt">></span>Lists<span class="nt"></a></li></span>
|
|
3337
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#links-and-images"</span><span class="nt">></span>Links and Images<span class="nt"></a></li></span>
|
|
3338
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#code"</span><span class="nt">></span>Code<span class="nt"></a></li></span>
|
|
3339
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#blockquotes"</span><span class="nt">></span>Blockquotes<span class="nt"></a></li></span>
|
|
3340
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#horizontal-rules"</span><span class="nt">></span>Horizontal Rules<span class="nt"></a></li></span>
|
|
3341
|
+
<span class="nt"></ul></span>
|
|
3342
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#tables"</span><span class="nt">></span>Tables<span class="nt"></a></li></span>
|
|
3343
|
+
<span class="nt"><ul></span>
|
|
3344
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#standard-tables"</span><span class="nt">></span>Standard Tables<span class="nt"></a></li></span>
|
|
3345
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#relaxed-tables"</span><span class="nt">></span>Relaxed Tables<span class="nt"></a></li></span>
|
|
3346
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#headerless-tables"</span><span class="nt">></span>Headerless Tables<span class="nt"></a></li></span>
|
|
3347
|
+
<span class="nt"><ul></span>
|
|
3348
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#row-header-columns"</span><span class="nt">></span>Row header columns<span class="nt"></a></li></span>
|
|
3349
|
+
<span class="nt"></ul></span>
|
|
3350
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#inline-tables-from-csvtsv"</span><span class="nt">></span>Inline Tables from CSV/TSV<span class="nt"></a></li></span>
|
|
3351
|
+
<span class="nt"><ul></span>
|
|
3352
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#fenced-csvtsv-tables"</span><span class="nt">></span>Fenced CSV/TSV tables<span class="nt"></a></li></span>
|
|
3353
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#alignment-rows-in-csvtsv-tables"</span><span class="nt">></span>Alignment rows in CSV/TSV tables<span class="nt"></a></li></span>
|
|
3354
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#table-markers"</span><span class="nt">></span><span class="c"><!--TABLE--></span> markers<span class="nt"></a></li></span>
|
|
3355
|
+
<span class="nt"></ul></span>
|
|
3356
|
+
<span class="nt"></ul></span>
|
|
3357
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#footnotes"</span><span class="nt">></span>Footnotes<span class="nt"></a></li></span>
|
|
3358
|
+
<span class="nt"><ul></span>
|
|
3359
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#reference-style"</span><span class="nt">></span>Reference Style<span class="nt"></a></li></span>
|
|
3360
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#inline-style-kramdown"</span><span class="nt">></span>Inline Style (Kramdown)<span class="nt"></a></li></span>
|
|
3361
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#inline-style-multimarkdown"</span><span class="nt">></span>Inline Style (MultiMarkdown)<span class="nt"></a></li></span>
|
|
3362
|
+
<span class="nt"></ul></span>
|
|
3363
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#definition-lists"</span><span class="nt">></span>Definition Lists<span class="nt"></a></li></span>
|
|
3364
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#citations"</span><span class="nt">></span>Citations<span class="nt"></a></li></span>
|
|
3365
|
+
<span class="nt"><ul></span>
|
|
3366
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#pandoc-citation-syntax"</span><span class="nt">></span>Pandoc Citation Syntax<span class="nt"></a></li></span>
|
|
3367
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#multimarkdown-citation-syntax"</span><span class="nt">></span>MultiMarkdown Citation Syntax<span class="nt"></a></li></span>
|
|
3368
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#mmark-citation-syntax"</span><span class="nt">></span>mmark Citation Syntax<span class="nt"></a></li></span>
|
|
3369
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#bibliography"</span><span class="nt">></span>Bibliography<span class="nt"></a></li></span>
|
|
3370
|
+
<span class="nt"></ul></span>
|
|
3371
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#indices"</span><span class="nt">></span>Indices<span class="nt"></a></li></span>
|
|
3372
|
+
<span class="nt"><ul></span>
|
|
3373
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#mmark-index-syntax"</span><span class="nt">></span>mmark Index Syntax<span class="nt"></a></li></span>
|
|
3374
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#textindex-syntax"</span><span class="nt">></span>TextIndex Syntax<span class="nt"></a></li></span>
|
|
3375
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#index-generation"</span><span class="nt">></span>Index Generation<span class="nt"></a></li></span>
|
|
3376
|
+
<span class="nt"></ul></span>
|
|
3377
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#math"</span><span class="nt">></span>Math<span class="nt"></a></li></span>
|
|
3378
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#wiki-links"</span><span class="nt">></span>Wiki Links<span class="nt"></a></li></span>
|
|
3379
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#critic-markup"</span><span class="nt">></span>Critic Markup<span class="nt"></a></li></span>
|
|
3380
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#callouts"</span><span class="nt">></span>Callouts<span class="nt"></a></li></span>
|
|
3381
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#file-includes"</span><span class="nt">></span>File Includes<span class="nt"></a></li></span>
|
|
3382
|
+
<span class="nt"><ul></span>
|
|
3383
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#apexoptions"</span><span class="nt">></span>apex_options<span class="nt"></a></li></span>
|
|
3384
|
+
<span class="nt"></ul></span>
|
|
3385
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#core-functions"</span><span class="nt">></span>Core Functions<span class="nt"></a></li></span>
|
|
3386
|
+
<span class="nt"><ul></span>
|
|
3387
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#apexoptionsdefault"</span><span class="nt">></span>apex_options_default<span class="nt"></a></li></span>
|
|
3388
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#apexoptionsformode"</span><span class="nt">></span>apex_options_for_mode<span class="nt"></a></li></span>
|
|
3389
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#apexmarkdowntohtml"</span><span class="nt">></span>apex_markdown_to_html<span class="nt"></a></li></span>
|
|
3390
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#apexfreestring"</span><span class="nt">></span>apex_free_string<span class="nt"></a></li></span>
|
|
3391
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#apexwraphtmldocument"</span><span class="nt">></span>apex_wrap_html_document<span class="nt"></a></li></span>
|
|
3392
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#apexprettyprinthtml"</span><span class="nt">></span>apex_pretty_print_html<span class="nt"></a></li></span>
|
|
3393
|
+
<span class="nt"></ul></span>
|
|
3394
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#version-functions"</span><span class="nt">></span>Version Functions<span class="nt"></a></li></span>
|
|
3395
|
+
<span class="nt"><ul></span>
|
|
3396
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#apexversionstring"</span><span class="nt">></span>apex_version_string<span class="nt"></a></li></span>
|
|
3397
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#apexversionmajor-apexversionminor-apexversionpatch"</span><span class="nt">></span>apex_version_major / apex_version_minor / apex_version_patch<span class="nt"></a></li></span>
|
|
3398
|
+
<span class="nt"></ul></span>
|
|
3399
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#list-options"</span><span class="nt">></span>List Options<span class="nt"></a></li></span>
|
|
3400
|
+
<span class="nt"><ul></span>
|
|
3401
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#mixed-list-markers"</span><span class="nt">></span>Mixed List Markers<span class="nt"></a></li></span>
|
|
3402
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#alpha-lists"</span><span class="nt">></span>Alpha Lists<span class="nt"></a></li></span>
|
|
3403
|
+
<span class="nt"></ul></span>
|
|
3404
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#feature-flags"</span><span class="nt">></span>Feature Flags<span class="nt"></a></li></span>
|
|
3405
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#metadata-options"</span><span class="nt">></span>Metadata Options<span class="nt"></a></li></span>
|
|
3406
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#file-inclusion"</span><span class="nt">></span>File Inclusion<span class="nt"></a></li></span>
|
|
3407
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#output-options"</span><span class="nt">></span>Output Options<span class="nt"></a></li></span>
|
|
3408
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#line-break-options"</span><span class="nt">></span>Line Break Options<span class="nt"></a></li></span>
|
|
3409
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#header-id-options"</span><span class="nt">></span>Header ID Options<span class="nt"></a></li></span>
|
|
3410
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#table-options"</span><span class="nt">></span>Table Options<span class="nt"></a></li></span>
|
|
3411
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#complete-example"</span><span class="nt">></span>Complete Example<span class="nt"></a></li></span>
|
|
3412
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#compiling-and-linking"</span><span class="nt">></span>Compiling and Linking<span class="nt"></a></li></span>
|
|
3413
|
+
<span class="nt"><ul></span>
|
|
3414
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#with-cmake"</span><span class="nt">></span>With CMake<span class="nt"></a></li></span>
|
|
3415
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#manual-compilation"</span><span class="nt">></span>Manual Compilation<span class="nt"></a></li></span>
|
|
3416
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#static-linking"</span><span class="nt">></span>Static Linking<span class="nt"></a></li></span>
|
|
3417
|
+
<span class="nt"></ul></span>
|
|
3418
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#thread-safety"</span><span class="nt">></span>Thread Safety<span class="nt"></a></li></span>
|
|
3419
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#memory-management"</span><span class="nt">></span>Memory Management<span class="nt"></a></li></span>
|
|
3420
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#error-handling"</span><span class="nt">></span>Error Handling<span class="nt"></a></li></span>
|
|
3421
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#performance-tips"</span><span class="nt">></span>Performance Tips<span class="nt"></a></li></span>
|
|
3422
|
+
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#related"</span><span class="nt">></span>Related<span class="nt"></a></li></span>
|
|
3423
|
+
<span class="nt"><ul></span>
|
|
3424
|
+
# <span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"MultiMarkdown"</span><span class="nt">></span>MMD<span class="nt"></abbr></span> style
|
|
3425
|
+
{{TOC:2-4}} # With range
|
|
3426
|
+
{:toc} # Kramdown IAL marker (uses same TOC engine)
|
|
3427
|
+
</code></pre>
|
|
3428
|
+
|
|
3429
|
+
<p>
|
|
3430
|
+
Headings with the <code>.no_toc</code> class are excluded from the generated TOC:
|
|
3431
|
+
</p>
|
|
3432
|
+
|
|
3433
|
+
<pre><code class="highlight language-markdown"><span class="gh"># Contents</span>
|
|
3434
|
+
|
|
3435
|
+
{:.no_toc}
|
|
3436
|
+
|
|
3437
|
+
<span class="c"><!--TOC--></span>
|
|
3438
|
+
</code></pre>
|
|
3439
|
+
|
|
3440
|
+
<h2 id="smart-typography">
|
|
3441
|
+
Smart Typography
|
|
3442
|
+
</h2>
|
|
3443
|
+
|
|
3444
|
+
<p>
|
|
3445
|
+
Automatic conversion:
|
|
3446
|
+
</p>
|
|
3447
|
+
|
|
3448
|
+
<ul>
|
|
3449
|
+
|
|
3450
|
+
<li>
|
|
3451
|
+
<code>"text"</code> → <code>"text"</code> (smart quotes)
|
|
3452
|
+
</li>
|
|
3453
|
+
|
|
3454
|
+
<li>
|
|
3455
|
+
<code>'text'</code> → <code>'text'</code> (smart apostrophes)
|
|
3456
|
+
</li>
|
|
3457
|
+
|
|
3458
|
+
<li>
|
|
3459
|
+
<code>--</code> → <code>–</code> (en dash)
|
|
3460
|
+
</li>
|
|
3461
|
+
|
|
3462
|
+
<li>
|
|
3463
|
+
<code>---</code> → <code>—</code> (em dash)
|
|
3464
|
+
</li>
|
|
3465
|
+
|
|
3466
|
+
<li>
|
|
3467
|
+
<code>...</code> → <code>…</code> (ellipsis)
|
|
3468
|
+
</li>
|
|
3469
|
+
|
|
3470
|
+
<li>
|
|
3471
|
+
<code><<</code> → <code>«</code> (left guillemet)
|
|
3472
|
+
</li>
|
|
3473
|
+
|
|
3474
|
+
<li>
|
|
3475
|
+
<code>>></code> → <code>»</code> (right guillemet)
|
|
3476
|
+
</li>
|
|
3477
|
+
|
|
3478
|
+
</ul>
|
|
3479
|
+
|
|
3480
|
+
<h2 id="github-emoji">
|
|
3481
|
+
GitHub Emoji
|
|
3482
|
+
</h2>
|
|
3483
|
+
|
|
3484
|
+
<pre><code class="highlight language-markdown">Success! 🚀 🎉 ✨
|
|
3485
|
+
I ❤️ Markdown!
|
|
3486
|
+
</code></pre>
|
|
3487
|
+
|
|
3488
|
+
<p>
|
|
3489
|
+
Supports 350+ GitHub emoji, converted to Unicode characters.
|
|
3490
|
+
</p>
|
|
3491
|
+
|
|
3492
|
+
<h2 id="special-markers">
|
|
3493
|
+
Special Markers
|
|
3494
|
+
</h2>
|
|
3495
|
+
|
|
3496
|
+
<p>
|
|
3497
|
+
<strong> Page breaks:</strong>
|
|
3498
|
+
</p>
|
|
3499
|
+
|
|
3500
|
+
<pre><code class="highlight language-markdown"><span class="nt"><div</span> <span class="na">class=</span><span class="s">"page-break"</span> <span class="na">style=</span><span class="s">"page-break-after: always;"</span><span class="nt">></div></span> # <span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"Hypertext Markup Language"</span><span class="nt">></span>HTML<span class="nt"></abbr></span> comment style
|
|
3501
|
+
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"page-break"</span> <span class="na">style=</span><span class="s">"page-break-after: always;"</span><span class="nt">></div></span> # Kramdown style
|
|
3502
|
+
</code></pre>
|
|
3503
|
+
|
|
3504
|
+
<p>
|
|
3505
|
+
<strong> Autoscroll pauses:</strong>
|
|
3506
|
+
</p>
|
|
3507
|
+
|
|
3508
|
+
<pre><code class="highlight language-markdown"><span class="nt"><div</span> <span class="na">class=</span><span class="s">"autoscroll-pause"</span> <span class="na">data-pause=</span><span class="s">"5"</span><span class="nt">></div></span> # Pause for 5 seconds
|
|
3509
|
+
</code></pre>
|
|
3510
|
+
|
|
3511
|
+
<p>
|
|
3512
|
+
<strong> End-of-block marker:</strong>
|
|
3513
|
+
</p>
|
|
3514
|
+
|
|
3515
|
+
<pre><code class="highlight language-markdown"><span class="p">-</span> Item 1
|
|
3516
|
+
|
|
3517
|
+
|
|
3518
|
+
<span class="p">
|
|
3519
|
+
-</span> Item 2
|
|
3520
|
+
</code></pre>
|
|
3521
|
+
|
|
3522
|
+
<p>
|
|
3523
|
+
Forces list separation.
|
|
3524
|
+
</p>
|
|
3525
|
+
|
|
3526
|
+
<h2 id="html">
|
|
3527
|
+
<abbr title="Hypertext Markup Language"> HTML</abbr>
|
|
3528
|
+
</h2>
|
|
3529
|
+
|
|
3530
|
+
<p>
|
|
3531
|
+
Raw <abbr title="Hypertext Markup Language">HTML</abbr> is supported (when <code>unsafe</code> option is enabled, which is default):
|
|
3532
|
+
</p>
|
|
3533
|
+
|
|
3534
|
+
<pre><code class="highlight language-markdown"><span class="nt"><div</span> <span class="na">class=</span><span class="s">"custom"</span><span class="nt">></span>
|
|
3535
|
+
<span class="nt"><p></span>This is raw <span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"Hypertext Markup Language"</span><span class="nt">></span>HTML<span class="nt"></abbr></span> inside Markdown.<span class="nt"></p></span>
|
|
3536
|
+
<span class="nt"></div></span>
|
|
3537
|
+
</code></pre>
|
|
3538
|
+
|
|
3539
|
+
<h3 id="markdown-inside-html-blocks">
|
|
3540
|
+
Markdown Inside <abbr title="Hypertext Markup Language">HTML</abbr> Blocks
|
|
3541
|
+
</h3>
|
|
3542
|
+
|
|
3543
|
+
<p>
|
|
3544
|
+
By default, Markdown inside <abbr title="Hypertext Markup Language">HTML</abbr> blocks is <strong>not</strong> parsed unless the <abbr title="Hypertext Markup Language">HTML</abbr> block contains blank lines. This follows the CommonMark specification:
|
|
3545
|
+
</p>
|
|
3546
|
+
|
|
3547
|
+
<ul>
|
|
3548
|
+
|
|
3549
|
+
<li>
|
|
3550
|
+
|
|
3551
|
+
<p>
|
|
3552
|
+
<strong><abbr title="Hypertext Markup Language"> HTML</abbr> blocks without blank lines</strong>: Content is treated as raw <abbr title="Hypertext Markup Language">HTML</abbr> and Markdown is not parsed
|
|
3553
|
+
</p>
|
|
3554
|
+
|
|
3555
|
+
<pre><code class="highlight language-markdown"><span class="nt"><div></span><span class="gs">**This is not bold**</span><span class="nt"></div></span>
|
|
3556
|
+
</code></pre>
|
|
3557
|
+
|
|
3558
|
+
<p>
|
|
3559
|
+
Output: <code><div>**This is not bold**</div></code>
|
|
3560
|
+
</p>
|
|
3561
|
+
|
|
3562
|
+
</li>
|
|
3563
|
+
|
|
3564
|
+
<li>
|
|
3565
|
+
|
|
3566
|
+
<p>
|
|
3567
|
+
<strong><abbr title="Hypertext Markup Language"> HTML</abbr> blocks with blank lines</strong>: Content can be parsed as Markdown
|
|
3568
|
+
</p>
|
|
3569
|
+
|
|
3570
|
+
<pre><code class="highlight language-markdown"><span class="nt"><div></span>
|
|
3571
|
+
|
|
3572
|
+
<span class="gs">**This is bold**</span>
|
|
3573
|
+
|
|
3574
|
+
<span class="nt"></div></span>
|
|
3575
|
+
</code></pre>
|
|
3576
|
+
|
|
3577
|
+
<p>
|
|
3578
|
+
Output: <code><div><p><strong>This is bold</strong></p></div></code>
|
|
3579
|
+
</p>
|
|
3580
|
+
|
|
3581
|
+
</li>
|
|
3582
|
+
|
|
3583
|
+
</ul>
|
|
3584
|
+
|
|
3585
|
+
<p>
|
|
3586
|
+
To explicitly enable Markdown parsing inside <abbr title="Hypertext Markup Language">HTML</abbr> blocks, use the <code>markdown</code> attribute (GFM extension):
|
|
3587
|
+
</p>
|
|
3588
|
+
|
|
3589
|
+
<pre><code class="highlight language-markdown"><span class="nt"><div><h2></span>This is a heading<span class="nt"></h2></span>
|
|
3590
|
+
<span class="nt"><ul></span>
|
|
3591
|
+
<span class="nt"><li></span>List item<span class="nt"></li></span>
|
|
3592
|
+
<span class="nt"></ul></span>
|
|
3593
|
+
<span class="nt"></div></span>
|
|
3594
|
+
|
|
3595
|
+
</code></pre>
|
|
3596
|
+
|
|
3597
|
+
<p>
|
|
3598
|
+
The <code>markdown</code> attribute accepts:
|
|
3599
|
+
</p>
|
|
3600
|
+
|
|
3601
|
+
<ul>
|
|
3602
|
+
|
|
3603
|
+
<li>
|
|
3604
|
+
<code>markdown="1"</code> or <code>markdown="block"</code> - Parse block-level Markdown
|
|
3605
|
+
</li>
|
|
3606
|
+
|
|
3607
|
+
<li>
|
|
3608
|
+
<code>markdown="span"</code> - Parse inline Markdown only
|
|
3609
|
+
</li>
|
|
3610
|
+
|
|
3611
|
+
</ul>
|
|
3612
|
+
|
|
3613
|
+
<h3 id="pandoc-fenced-divs">
|
|
3614
|
+
Pandoc Fenced Divs
|
|
3615
|
+
</h3>
|
|
3616
|
+
|
|
3617
|
+
<p>
|
|
3618
|
+
Apex supports Pandoc’s fenced divs extension, which allows you to create <abbr title="Hypertext Markup Language">HTML</abbr> <code><div></code> elements with attributes using a special fence syntax. This feature is available in <strong>unified mode only</strong> and is enabled by default.
|
|
3619
|
+
</p>
|
|
3620
|
+
|
|
3621
|
+
<p>
|
|
3622
|
+
<strong> Basic syntax:</strong>
|
|
3623
|
+
</p>
|
|
3624
|
+
|
|
3625
|
+
<pre><code class="highlight language-markdown"><span class="nt"><div</span> <span class="na">id=</span><span class="s">"special"</span> <span class="na">class=</span><span class="s">"sidebar"</span><span class="nt">><p></span>Here is a paragraph.<span class="nt"></p></span>
|
|
3626
|
+
<span class="nt"><p></span>And another.<span class="nt"></p></span>
|
|
3627
|
+
<span class="nt"></div></span>
|
|
3628
|
+
</code></pre>
|
|
3629
|
+
|
|
3630
|
+
<p>
|
|
3631
|
+
<strong> Opening fences:</strong>
|
|
3632
|
+
</p>
|
|
3633
|
+
|
|
3634
|
+
<ul>
|
|
3635
|
+
|
|
3636
|
+
<li>
|
|
3637
|
+
Must contain at least 3 consecutive colons (<code>:::</code>)
|
|
3638
|
+
</li>
|
|
3639
|
+
|
|
3640
|
+
<li>
|
|
3641
|
+
Must have attributes (ID, classes, or custom attributes)
|
|
3642
|
+
</li>
|
|
3643
|
+
|
|
3644
|
+
<li>
|
|
3645
|
+
Attributes can optionally be followed by another string of consecutive colons
|
|
3646
|
+
</li>
|
|
3647
|
+
|
|
3648
|
+
</ul>
|
|
3649
|
+
|
|
3650
|
+
<p>
|
|
3651
|
+
<strong> Closing fences:</strong>
|
|
3652
|
+
</p>
|
|
3653
|
+
|
|
3654
|
+
<ul>
|
|
3655
|
+
|
|
3656
|
+
<li>
|
|
3657
|
+
Must contain at least 3 consecutive colons (<code>:::</code>)
|
|
3658
|
+
</li>
|
|
3659
|
+
|
|
3660
|
+
<li>
|
|
3661
|
+
No attributes needed
|
|
3662
|
+
</li>
|
|
3663
|
+
|
|
3664
|
+
<li>
|
|
3665
|
+
Number of colons doesn’t need to match the opening fence
|
|
3666
|
+
</li>
|
|
3667
|
+
|
|
3668
|
+
</ul>
|
|
3669
|
+
|
|
3670
|
+
<p>
|
|
3671
|
+
<strong> Attributes:</strong>
|
|
3672
|
+
Attributes use the same syntax as fenced code blocks:
|
|
3673
|
+
</p>
|
|
3674
|
+
|
|
3675
|
+
<ul>
|
|
3676
|
+
|
|
3677
|
+
<li>
|
|
3678
|
+
<code>{#id}</code> - ID attribute
|
|
3679
|
+
</li>
|
|
3680
|
+
|
|
3681
|
+
<li>
|
|
3682
|
+
<code>{.class}</code> - Class attribute (can have multiple)
|
|
3683
|
+
</li>
|
|
3684
|
+
|
|
3685
|
+
<li>
|
|
3686
|
+
<code>key="value"</code> - Custom attributes with quoted values
|
|
3687
|
+
</li>
|
|
3688
|
+
|
|
3689
|
+
<li>
|
|
3690
|
+
<code>key='value'</code> - Custom attributes with single quotes
|
|
3691
|
+
</li>
|
|
3692
|
+
|
|
3693
|
+
<li>
|
|
3694
|
+
Single unbraced word is treated as a class name
|
|
3695
|
+
</li>
|
|
3696
|
+
|
|
3697
|
+
</ul>
|
|
3698
|
+
|
|
3699
|
+
<p>
|
|
3700
|
+
<strong> Examples:</strong>
|
|
3701
|
+
</p>
|
|
3702
|
+
|
|
3703
|
+
<pre><code class="highlight language-markdown"><span class="nt"><div</span> <span class="na">id=</span><span class="s">"mydiv"</span> <span class="na">class=</span><span class="s">"container"</span><span class="nt">><p></span>Content here<span class="nt"></p></span>
|
|
3704
|
+
<span class="nt"></div></span>
|
|
3705
|
+
|
|
3706
|
+
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"sidebar"</span><span class="nt">><p></span>Single unbraced word becomes a class<span class="nt"></p></span>
|
|
3707
|
+
<span class="nt"></div></span>
|
|
3708
|
+
|
|
3709
|
+
<span class="nt"><div</span> <span class="na">id=</span><span class="s">"special"</span> <span class="na">class=</span><span class="s">"warning important"</span> <span class="na">key=</span><span class="s">"value"</span><span class="nt">><p></span>Div with ID, multiple classes, and custom attribute<span class="nt"></p></span>
|
|
3710
|
+
<span class="nt"></div></span>
|
|
3711
|
+
|
|
3712
|
+
<span class="nt"><div</span> <span class="na">id=</span><span class="s">"special"</span> <span class="na">class=</span><span class="s">"sidebar"</span><span class="nt">><p></span>Trailing colons after attributes are allowed<span class="nt"></p></span>
|
|
3713
|
+
<span class="nt"></div></span>
|
|
3714
|
+
</code></pre>
|
|
3715
|
+
|
|
3716
|
+
<p>
|
|
3717
|
+
<strong> Nested divs:</strong>
|
|
3718
|
+
Fenced divs can be nested. Opening fences must have attributes:
|
|
3719
|
+
</p>
|
|
3720
|
+
|
|
3721
|
+
<pre><code class="highlight language-markdown"><span class="nt"><div</span> <span class="na">class=</span><span class="s">"Warning"</span><span class="nt">><p></span>This is a warning.<span class="nt"></p></span>
|
|
3722
|
+
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"Danger"</span><span class="nt">><p></span>This is a warning within a warning.<span class="nt"></p></span>
|
|
3723
|
+
<span class="nt"></div></span>
|
|
3724
|
+
<span class="nt"></div></span>
|
|
3725
|
+
</code></pre>
|
|
3726
|
+
|
|
3727
|
+
<p>
|
|
3728
|
+
<strong> Block types:</strong>
|
|
3729
|
+
By default, fenced divs create <code><div></code> elements. You can specify different <abbr title="Hypertext Markup Language">HTML</abbr> block elements using the <code>>blocktype</code> syntax:
|
|
3730
|
+
</p>
|
|
3731
|
+
|
|
3732
|
+
<pre><code class="highlight language-markdown"><span class="nt"><aside</span> <span class="na">class=</span><span class="s">"sidebar"</span> <span class="na">markdown=</span><span class="s">"1"</span><span class="nt">></span>This creates an <span class="nt"><aside></span> element instead of a <span class="nt"><div></span>.
|
|
3733
|
+
<span class="nt"></aside></span>
|
|
3734
|
+
<span class="nt"><article</span> <span class="na">id=</span><span class="s">"post"</span> <span class="na">class=</span><span class="s">"main"</span> <span class="na">markdown=</span><span class="s">"1"</span><span class="nt">></span>This creates an <span class="nt"><article></span> element.
|
|
3735
|
+
<span class="nt"></article></span>
|
|
3736
|
+
<span class="nt"><section</span> <span class="na">class=</span><span class="s">"container"</span> <span class="na">markdown=</span><span class="s">"1"</span><span class="nt">></span>This creates a <span class="nt"><section></span> element.
|
|
3737
|
+
<span class="nt"></section></span><span class="sb">```
|
|
3738
|
+
|
|
3739
|
+
**Common block types:**
|
|
3740
|
+
- `>div` - Default, creates a `<div>` element
|
|
3741
|
+
- `>aside` - Creates an `<aside>` element (sidebars, callouts)
|
|
3742
|
+
- `>article` - Creates an `<article>` element (main content)
|
|
3743
|
+
- `>section` - Creates a `<section>` element (document sections)
|
|
3744
|
+
- `>details` - Creates a `<details>` element (collapsible content)
|
|
3745
|
+
- `>summary` - Creates a `<summary>` element (for use inside `<details>`)
|
|
3746
|
+
|
|
3747
|
+
**Nested block types:**
|
|
3748
|
+
You can nest different block types:
|
|
3749
|
+
```</span>markdown
|
|
3750
|
+
<span class="nt"><details</span> <span class="na">class=</span><span class="s">"warning"</span><span class="nt">><summary><p></span>This is a summary<span class="nt"></p></span>
|
|
3751
|
+
<span class="nt"></summary></span>
|
|
3752
|
+
This is the content of the details block
|
|
3753
|
+
<span class="nt"></details></span>
|
|
3754
|
+
|
|
3755
|
+
<span class="nt"><section</span> <span class="na">class=</span><span class="s">"outer"</span><span class="nt">><p></span>Outer section content.<span class="nt"></p></span>
|
|
3756
|
+
<span class="nt"><aside</span> <span class="na">class=</span><span class="s">"inner"</span><span class="nt">><p></span>Inner aside content.<span class="nt"></p></span>
|
|
3757
|
+
<span class="nt"></aside></span>
|
|
3758
|
+
<span class="nt"><p></span>More outer content.<span class="nt"></p></span>
|
|
3759
|
+
<span class="nt"></section></span>
|
|
3760
|
+
</code></pre>
|
|
3761
|
+
|
|
3762
|
+
<p>
|
|
3763
|
+
<strong> Block type with unbraced class:</strong>
|
|
3764
|
+
The block type syntax works with unbraced class names:
|
|
3765
|
+
</p>
|
|
3766
|
+
|
|
3767
|
+
<pre><code class="highlight language-markdown"><span class="nt"><aside</span> <span class="na">class=</span><span class="s">"Warning"</span><span class="nt">><p></span>Warning content here<span class="nt"></p></span>
|
|
3768
|
+
<span class="nt"></aside></span>
|
|
3769
|
+
</code></pre>
|
|
3770
|
+
|
|
3771
|
+
<p>
|
|
3772
|
+
This creates <code><aside class="Warning">...</aside></code>.
|
|
3773
|
+
</p>
|
|
3774
|
+
|
|
3775
|
+
<p>
|
|
3776
|
+
<strong> Note:</strong> Fenced divs should be separated by blank lines from preceding and following blocks for best results.
|
|
3777
|
+
</p>
|
|
3778
|
+
|
|
3779
|
+
<p>
|
|
3780
|
+
<strong> Control:</strong>
|
|
3781
|
+
</p>
|
|
3782
|
+
|
|
3783
|
+
<ul>
|
|
3784
|
+
|
|
3785
|
+
<li>
|
|
3786
|
+
Use <code>--divs</code> to explicitly enable (default in unified mode)
|
|
3787
|
+
</li>
|
|
3788
|
+
|
|
3789
|
+
<li>
|
|
3790
|
+
Use <code>--no-divs</code> to disable fenced divs processing
|
|
3791
|
+
</li>
|
|
3792
|
+
|
|
3793
|
+
</ul>
|
|
3794
|
+
|
|
3795
|
+
<h2 id="related">
|
|
3796
|
+
Related
|
|
3797
|
+
</h2>
|
|
3798
|
+
|
|
3799
|
+
<ul>
|
|
3800
|
+
|
|
3801
|
+
<li>
|
|
3802
|
+
<a href="Modes.html"> Modes</a> - Which syntax is available in each mode
|
|
3803
|
+
</li>
|
|
3804
|
+
|
|
3805
|
+
<li>
|
|
3806
|
+
<a href="Header-IDs.html"> Header IDs</a> - Automatic header ID generation
|
|
3807
|
+
</li>
|
|
3808
|
+
|
|
3809
|
+
<li>
|
|
3810
|
+
<a href="Command-Line-Options.html"> Command Line Options</a> - Feature flags including <code>--[no-]autolink</code>, <code>--[no-]mixed-lists</code>, <code>--[no-]alpha-lists</code>, <code>--[no-]sup-sub</code>, and <code>--[no-]divs</code>
|
|
3811
|
+
</li>
|
|
3812
|
+
|
|
3813
|
+
</ul>
|
|
3814
|
+
|
|
3815
|
+
<script>
|
|
3816
|
+
// Hamburger menu functionality
|
|
3817
|
+
(function() {
|
|
3818
|
+
function initHamburgerMenu() {
|
|
3819
|
+
var hamburger = document.getElementById('hamburger-menu');
|
|
3820
|
+
var sidebar = document.querySelector('.main-toc, .sidebar');
|
|
3821
|
+
var overlay = document.getElementById('mobile-menu-overlay');
|
|
3822
|
+
|
|
3823
|
+
if (!hamburger || !sidebar) return;
|
|
3824
|
+
|
|
3825
|
+
function toggleMenu() {
|
|
3826
|
+
var isOpen = sidebar.classList.contains('mobile-open');
|
|
3827
|
+
if (isOpen) {
|
|
3828
|
+
sidebar.classList.remove('mobile-open');
|
|
3829
|
+
hamburger.classList.remove('active');
|
|
3830
|
+
if (overlay) overlay.classList.remove('active');
|
|
3831
|
+
} else {
|
|
3832
|
+
sidebar.classList.add('mobile-open');
|
|
3833
|
+
hamburger.classList.add('active');
|
|
3834
|
+
if (overlay) overlay.classList.add('active');
|
|
3835
|
+
}
|
|
3836
|
+
}
|
|
3837
|
+
|
|
3838
|
+
hamburger.addEventListener('click', function(e) {
|
|
3839
|
+
e.stopPropagation();
|
|
3840
|
+
toggleMenu();
|
|
3841
|
+
});
|
|
3842
|
+
|
|
3843
|
+
if (overlay) {
|
|
3844
|
+
overlay.addEventListener('click', function() {
|
|
3845
|
+
toggleMenu();
|
|
3846
|
+
});
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
// Close menu when clicking on a sidebar link (mobile only)
|
|
3850
|
+
if (window.innerWidth <= 768) {
|
|
3851
|
+
var sidebarLinks = sidebar.querySelectorAll('a');
|
|
3852
|
+
sidebarLinks.forEach(function(link) {
|
|
3853
|
+
link.addEventListener('click', function() {
|
|
3854
|
+
setTimeout(function() {
|
|
3855
|
+
sidebar.classList.remove('mobile-open');
|
|
3856
|
+
hamburger.classList.remove('active');
|
|
3857
|
+
if (overlay) overlay.classList.remove('active');
|
|
3858
|
+
}, 100);
|
|
3859
|
+
});
|
|
3860
|
+
});
|
|
3861
|
+
}
|
|
3862
|
+
|
|
3863
|
+
// Close menu on window resize if going to desktop
|
|
3864
|
+
window.addEventListener('resize', function() {
|
|
3865
|
+
if (window.innerWidth > 768) {
|
|
3866
|
+
sidebar.classList.remove('mobile-open');
|
|
3867
|
+
hamburger.classList.remove('active');
|
|
3868
|
+
if (overlay) overlay.classList.remove('active');
|
|
3869
|
+
}
|
|
3870
|
+
});
|
|
3871
|
+
}
|
|
3872
|
+
|
|
3873
|
+
// Initialize when DOM is ready
|
|
3874
|
+
if (document.readyState === 'loading') {
|
|
3875
|
+
document.addEventListener('DOMContentLoaded', initHamburgerMenu);
|
|
3876
|
+
} else {
|
|
3877
|
+
initHamburgerMenu();
|
|
3878
|
+
}
|
|
3879
|
+
})();
|
|
3880
|
+
|
|
3881
|
+
</script>
|
|
3882
|
+
<script>
|
|
3883
|
+
(function() {
|
|
3884
|
+
// Clone the page TOC for floating TOC
|
|
3885
|
+
function initFloatingTOC() {
|
|
3886
|
+
var pageTOC = document.getElementById('page-toc-top');
|
|
3887
|
+
var floatingTOCContent = document.getElementById('floating-toc-content');
|
|
3888
|
+
var floatingTOC = document.getElementById('floating-toc');
|
|
3889
|
+
|
|
3890
|
+
if (!pageTOC || !floatingTOCContent || !floatingTOC) return;
|
|
3891
|
+
|
|
3892
|
+
// Clone the TOC structure
|
|
3893
|
+
var tocClone = pageTOC.cloneNode(true);
|
|
3894
|
+
tocClone.id = 'floating-toc-clone';
|
|
3895
|
+
floatingTOCContent.appendChild(tocClone);
|
|
3896
|
+
|
|
3897
|
+
// Update all links to use smooth scrolling
|
|
3898
|
+
var allTOCLinks = document.querySelectorAll('.page-toc a, .floating-toc-content a');
|
|
3899
|
+
allTOCLinks.forEach(function(link) {
|
|
3900
|
+
link.addEventListener('click', function(e) {
|
|
3901
|
+
var href = this.getAttribute('href');
|
|
3902
|
+
if (href && href.startsWith('#')) {
|
|
3903
|
+
e.preventDefault();
|
|
3904
|
+
var targetId = href.substring(1);
|
|
3905
|
+
var targetElement = document.getElementById(targetId);
|
|
3906
|
+
if (targetElement) {
|
|
3907
|
+
var offset = 20; // Offset from top
|
|
3908
|
+
|
|
3909
|
+
// Function to calculate absolute position from document top
|
|
3910
|
+
function getAbsoluteTop(element) {
|
|
3911
|
+
var top = 0;
|
|
3912
|
+
while (element) {
|
|
3913
|
+
top += element.offsetTop;
|
|
3914
|
+
element = element.offsetParent;
|
|
3915
|
+
}
|
|
3916
|
+
return top;
|
|
3917
|
+
}
|
|
3918
|
+
|
|
3919
|
+
var absoluteTop = getAbsoluteTop(targetElement);
|
|
3920
|
+
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
3921
|
+
var offsetPosition = absoluteTop - offset;
|
|
3922
|
+
|
|
3923
|
+
// Only scroll if we're not already at the target position
|
|
3924
|
+
if (Math.abs(scrollTop - offsetPosition) > 10) {
|
|
3925
|
+
window.scrollTo({
|
|
3926
|
+
top: Math.max(0, offsetPosition),
|
|
3927
|
+
behavior: 'smooth'
|
|
3928
|
+
});
|
|
3929
|
+
}
|
|
3930
|
+
|
|
3931
|
+
// Update URL hash without triggering scroll
|
|
3932
|
+
if (history.pushState) {
|
|
3933
|
+
history.pushState(null, null, href);
|
|
3934
|
+
}
|
|
3935
|
+
}
|
|
3936
|
+
}
|
|
3937
|
+
});
|
|
3938
|
+
});
|
|
3939
|
+
|
|
3940
|
+
// Handle scroll to show/hide floating TOC
|
|
3941
|
+
var tocTop = pageTOC.getBoundingClientRect().top + window.pageYOffset;
|
|
3942
|
+
var tocBottom = tocTop + pageTOC.offsetHeight;
|
|
3943
|
+
|
|
3944
|
+
function updateFloatingTOC() {
|
|
3945
|
+
var scrollY = window.pageYOffset || document.documentElement.scrollTop;
|
|
3946
|
+
|
|
3947
|
+
if (scrollY > tocBottom) {
|
|
3948
|
+
floatingTOC.classList.add('visible');
|
|
3949
|
+
} else {
|
|
3950
|
+
floatingTOC.classList.remove('visible');
|
|
3951
|
+
}
|
|
3952
|
+
}
|
|
3953
|
+
|
|
3954
|
+
// Throttle scroll events
|
|
3955
|
+
var ticking = false;
|
|
3956
|
+
window.addEventListener('scroll', function() {
|
|
3957
|
+
if (!ticking) {
|
|
3958
|
+
window.requestAnimationFrame(function() {
|
|
3959
|
+
updateFloatingTOC();
|
|
3960
|
+
ticking = false;
|
|
3961
|
+
});
|
|
3962
|
+
ticking = true;
|
|
3963
|
+
}
|
|
3964
|
+
});
|
|
3965
|
+
|
|
3966
|
+
// Initial check
|
|
3967
|
+
updateFloatingTOC();
|
|
3968
|
+
}
|
|
3969
|
+
|
|
3970
|
+
// Initialize when DOM is ready
|
|
3971
|
+
if (document.readyState === 'loading') {
|
|
3972
|
+
document.addEventListener('DOMContentLoaded', initFloatingTOC);
|
|
3973
|
+
} else {
|
|
3974
|
+
initFloatingTOC();
|
|
3975
|
+
}
|
|
3976
|
+
})();
|
|
3977
|
+
</script>
|
|
3978
|
+
<footer class="page-footer"><p>Copyright 2025 Brett Terpstra, All Rights Reserved | MIT License</p></footer></body>
|
|
3979
|
+
|
|
3980
|
+
</html>
|
|
3981
|
+
|