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,1531 @@
|
|
|
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="metadata-transforms">
|
|
708
|
+
Metadata Transforms
|
|
709
|
+
</h1>
|
|
710
|
+
<nav class="page-toc" id="page-toc-top"><ul><li><a href="#metadata-transforms">Metadata Transforms</a><ul><li><a href="#metadata-sources">Metadata Sources</a></li><li><a href="#basic-usage">Basic Usage</a></li><li><a href="#enabling-transforms">Enabling Transforms</a></li><li><a href="#case-transforms">Case Transforms</a><ul><li><a href="#upper">upper</a></li><li><a href="#lower">lower</a></li><li><a href="#title">title</a></li><li><a href="#capitalize">capitalize</a></li></ul></li><li><a href="#string-manipulation">String Manipulation</a><ul><li><a href="#trim">trim</a></li><li><a href="#slug-slugify">slug / slugify</a></li><li><a href="#replaceoldnew-replaceregexpatternreplacement">replace(OLD,NEW) / replace(regex:PATTERN,REPLACEMENT)</a></li><li><a href="#substringstartend-substrstartend">substring(START,END) / substr(START,END)</a></li><li><a href="#truncatelengthsuffix">truncate(LENGTH,SUFFIX)</a></li><li><a href="#reverse">reverse</a></li></ul></li><li><a href="#array-transforms">Array Transforms</a><ul><li><a href="#splitdelimiter">split(DELIMITER)</a></li><li><a href="#joindelimiter">join(DELIMITER)</a></li><li><a href="#first">first</a></li><li><a href="#last">last</a></li><li><a href="#slicestartlength">slice(START,LENGTH)</a></li></ul></li><li><a href="#utility-transforms">Utility Transforms</a><ul><li><a href="#defaultvalue">default(VALUE)</a></li><li><a href="#escape-htmlescape">escape / html_escape</a></li><li><a href="#basename">basename</a></li><li><a href="#urlencode">urlencode</a></li><li><a href="#urldecode">urldecode</a></li><li><a href="#prefixvalue">prefix(VALUE)</a></li><li><a href="#suffixvalue">suffix(VALUE)</a></li><li><a href="#removestring">remove(STRING)</a></li><li><a href="#repeatcount">repeat(COUNT)</a></li></ul></li><li><a href="#formatting-transforms">Formatting Transforms</a><ul><li><a href="#formatformatstring">format(FORMAT_STRING)</a></li><li><a href="#length">length</a></li><li><a href="#padwidthchar">pad(WIDTH,CHAR)</a></li><li><a href="#containsstring">contains(STRING)</a></li></ul></li><li><a href="#datetime-transforms">Date/Time Transforms</a><ul><li><a href="#strftimeformat">strftime(FORMAT)</a></li></ul></li><li><a href="#transform-chaining">Transform Chaining</a></li><li><a href="#notes">Notes</a></li></ul></li></ul></nav>
|
|
711
|
+
|
|
712
|
+
<p>
|
|
713
|
+
Metadata transforms allow you to modify metadata values using the <code>[%key:transform]</code> syntax. Transforms can be chained together, and many accept optional parameters.
|
|
714
|
+
</p>
|
|
715
|
+
|
|
716
|
+
<h2 id="metadata-sources">
|
|
717
|
+
Metadata Sources
|
|
718
|
+
</h2>
|
|
719
|
+
|
|
720
|
+
<p>
|
|
721
|
+
Metadata can come from three sources (merged in priority order):
|
|
722
|
+
</p>
|
|
723
|
+
|
|
724
|
+
<ol>
|
|
725
|
+
|
|
726
|
+
<li>
|
|
727
|
+
<strong> Command-line</strong>: <code>--meta KEY=VALUE</code> (highest priority)
|
|
728
|
+
</li>
|
|
729
|
+
|
|
730
|
+
<li>
|
|
731
|
+
<strong> Document</strong>: Metadata embedded in the document (YAML, MMD, or Pandoc format)
|
|
732
|
+
</li>
|
|
733
|
+
|
|
734
|
+
<li>
|
|
735
|
+
<strong> External file</strong>: <code>--meta-file FILE</code> (lowest priority)
|
|
736
|
+
</li>
|
|
737
|
+
|
|
738
|
+
</ol>
|
|
739
|
+
|
|
740
|
+
<p>
|
|
741
|
+
See <a href="Command-Line-Options.html">Command Line Options</a> for details on <code>--meta-file</code> and <code>--meta</code> flags.
|
|
742
|
+
</p>
|
|
743
|
+
|
|
744
|
+
<h2 id="basic-usage">
|
|
745
|
+
Basic Usage
|
|
746
|
+
</h2>
|
|
747
|
+
|
|
748
|
+
<p>
|
|
749
|
+
The basic syntax is <code>[%key:transform]</code> where <code>key</code> is a metadata key and <code>transform</code> is one of the available transforms:
|
|
750
|
+
</p>
|
|
751
|
+
|
|
752
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
753
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">hello world</span>
|
|
754
|
+
<span class="nn">---</span>
|
|
755
|
+
|
|
756
|
+
<span class="gh"># [%title:upper]</span>
|
|
757
|
+
<span class="c"><!-- Outputs: # HELLO WORLD --></span>
|
|
758
|
+
</code></pre>
|
|
759
|
+
|
|
760
|
+
<p>
|
|
761
|
+
Transforms can be chained using colons:
|
|
762
|
+
</p>
|
|
763
|
+
|
|
764
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
765
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">hello world</span>
|
|
766
|
+
<span class="nn">---</span>
|
|
767
|
+
|
|
768
|
+
<span class="gh"># [%title🐢split( ):first]</span>
|
|
769
|
+
<span class="c"><!-- Outputs: # Hello --></span>
|
|
770
|
+
</code></pre>
|
|
771
|
+
|
|
772
|
+
<h2 id="enabling-transforms">
|
|
773
|
+
Enabling Transforms
|
|
774
|
+
</h2>
|
|
775
|
+
|
|
776
|
+
<p>
|
|
777
|
+
Metadata transforms are <strong>enabled by default in unified mode</strong>. For other modes, use the <code>--transforms</code> flag:
|
|
778
|
+
</p>
|
|
779
|
+
|
|
780
|
+
<pre><code class="highlight language-bash">apex document.md <span class="nt">--transforms</span>
|
|
781
|
+
</code></pre>
|
|
782
|
+
|
|
783
|
+
<p>
|
|
784
|
+
To disable transforms (even in unified mode), use <code>--no-transforms</code>.
|
|
785
|
+
</p>
|
|
786
|
+
|
|
787
|
+
<h2 id="case-transforms">
|
|
788
|
+
Case Transforms
|
|
789
|
+
</h2>
|
|
790
|
+
|
|
791
|
+
<h3 id="upper">
|
|
792
|
+
<code>upper</code>
|
|
793
|
+
</h3>
|
|
794
|
+
|
|
795
|
+
<p>
|
|
796
|
+
Converts the value to uppercase.
|
|
797
|
+
</p>
|
|
798
|
+
|
|
799
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
800
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">hello world</span>
|
|
801
|
+
<span class="nn">---</span>
|
|
802
|
+
|
|
803
|
+
[%title:upper]
|
|
804
|
+
<span class="c"><!-- Outputs: HELLO WORLD --></span>
|
|
805
|
+
</code></pre>
|
|
806
|
+
|
|
807
|
+
<h3 id="lower">
|
|
808
|
+
<code>lower</code>
|
|
809
|
+
</h3>
|
|
810
|
+
|
|
811
|
+
<p>
|
|
812
|
+
Converts the value to lowercase.
|
|
813
|
+
</p>
|
|
814
|
+
|
|
815
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
816
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">HELLO WORLD</span>
|
|
817
|
+
<span class="nn">---</span>
|
|
818
|
+
|
|
819
|
+
[%title:lower]
|
|
820
|
+
<span class="c"><!-- Outputs: hello world --></span>
|
|
821
|
+
</code></pre>
|
|
822
|
+
|
|
823
|
+
<h3 id="title">
|
|
824
|
+
<code>title</code>
|
|
825
|
+
</h3>
|
|
826
|
+
|
|
827
|
+
<p>
|
|
828
|
+
Converts the value to title case (capitalizes first letter of each word).
|
|
829
|
+
</p>
|
|
830
|
+
|
|
831
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
832
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">hello world</span>
|
|
833
|
+
<span class="nn">---</span>
|
|
834
|
+
|
|
835
|
+
[%title:title]
|
|
836
|
+
<span class="c"><!-- Outputs: Hello World --></span>
|
|
837
|
+
</code></pre>
|
|
838
|
+
|
|
839
|
+
<h3 id="capitalize">
|
|
840
|
+
<code>capitalize</code>
|
|
841
|
+
</h3>
|
|
842
|
+
|
|
843
|
+
<p>
|
|
844
|
+
Capitalizes only the first letter of the value.
|
|
845
|
+
</p>
|
|
846
|
+
|
|
847
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
848
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">hello world</span>
|
|
849
|
+
<span class="nn">---</span>
|
|
850
|
+
|
|
851
|
+
[%title:capitalize]
|
|
852
|
+
<span class="c"><!-- Outputs: Hello world --></span>
|
|
853
|
+
</code></pre>
|
|
854
|
+
|
|
855
|
+
<h2 id="string-manipulation">
|
|
856
|
+
String Manipulation
|
|
857
|
+
</h2>
|
|
858
|
+
|
|
859
|
+
<h3 id="trim">
|
|
860
|
+
<code>trim</code>
|
|
861
|
+
</h3>
|
|
862
|
+
|
|
863
|
+
<p>
|
|
864
|
+
Removes leading and trailing whitespace.
|
|
865
|
+
</p>
|
|
866
|
+
|
|
867
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
868
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s2">"</span><span class="nv"> </span><span class="s">hello</span><span class="nv"> </span><span class="s">world</span><span class="nv"> </span><span class="s">"</span>
|
|
869
|
+
<span class="nn">---</span>
|
|
870
|
+
|
|
871
|
+
[%title:trim]
|
|
872
|
+
<span class="c"><!-- Outputs: hello world --></span>
|
|
873
|
+
</code></pre>
|
|
874
|
+
|
|
875
|
+
<h3 id="slug-slugify">
|
|
876
|
+
<code>slug</code> / <code>slugify</code>
|
|
877
|
+
</h3>
|
|
878
|
+
|
|
879
|
+
<p>
|
|
880
|
+
Converts the value to a URL-friendly slug (lowercase, spaces and special characters replaced with hyphens).
|
|
881
|
+
</p>
|
|
882
|
+
|
|
883
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
884
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">My Great Post!</span>
|
|
885
|
+
<span class="nn">---</span>
|
|
886
|
+
|
|
887
|
+
[%title:slug]
|
|
888
|
+
<span class="c"><!-- Outputs: my-great-post --></span>
|
|
889
|
+
</code></pre>
|
|
890
|
+
|
|
891
|
+
<h3 id="replaceoldnew-replaceregexpatternreplacement">
|
|
892
|
+
<code>replace(OLD,NEW)</code> / <code>replace(regex:PATTERN,REPLACEMENT)</code>
|
|
893
|
+
</h3>
|
|
894
|
+
|
|
895
|
+
<p>
|
|
896
|
+
Replaces occurrences of <code>OLD</code> with <code>NEW</code>. Supports both simple string replacement and regex patterns.
|
|
897
|
+
</p>
|
|
898
|
+
|
|
899
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
900
|
+
<span class="na">url</span><span class="pi">:</span> <span class="s">http://example.com</span>
|
|
901
|
+
<span class="nn">---</span>
|
|
902
|
+
|
|
903
|
+
[%url:replace(http:,https:)]
|
|
904
|
+
<span class="c"><!-- Outputs: https://example.com --></span>
|
|
905
|
+
</code></pre>
|
|
906
|
+
|
|
907
|
+
<p>
|
|
908
|
+
<strong> Regex replacement:</strong>
|
|
909
|
+
</p>
|
|
910
|
+
|
|
911
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
912
|
+
<span class="na">text</span><span class="pi">:</span> <span class="s">Hello 123 World</span>
|
|
913
|
+
<span class="nn">---</span>
|
|
914
|
+
|
|
915
|
+
[%text:replace(regex:[0-9]+,N)]
|
|
916
|
+
<span class="c"><!-- Outputs: Hello N World --></span>
|
|
917
|
+
</code></pre>
|
|
918
|
+
|
|
919
|
+
<h3 id="substringstartend-substrstartend">
|
|
920
|
+
<code>substring(START,END)</code> / <code>substr(START,END)</code>
|
|
921
|
+
</h3>
|
|
922
|
+
|
|
923
|
+
<p>
|
|
924
|
+
Extracts a substring. Supports negative indices (from end).
|
|
925
|
+
</p>
|
|
926
|
+
|
|
927
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
928
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">Hello World</span>
|
|
929
|
+
<span class="nn">---</span>
|
|
930
|
+
|
|
931
|
+
[%title:substr(0,5)]
|
|
932
|
+
<span class="c"><!-- Outputs: Hello --></span>
|
|
933
|
+
|
|
934
|
+
[%title:substr(-5)]
|
|
935
|
+
<span class="c"><!-- Outputs: World (last 5 characters) --></span>
|
|
936
|
+
</code></pre>
|
|
937
|
+
|
|
938
|
+
<h3 id="truncatelengthsuffix">
|
|
939
|
+
<code>truncate(LENGTH,SUFFIX)</code>
|
|
940
|
+
</h3>
|
|
941
|
+
|
|
942
|
+
<p>
|
|
943
|
+
Truncates the value to the specified length, optionally appending a suffix.
|
|
944
|
+
</p>
|
|
945
|
+
|
|
946
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
947
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">This is a very long title</span>
|
|
948
|
+
<span class="nn">---</span>
|
|
949
|
+
|
|
950
|
+
[%title:truncate(15,...)]
|
|
951
|
+
<span class="c"><!-- Outputs: This is a very... --></span>
|
|
952
|
+
</code></pre>
|
|
953
|
+
|
|
954
|
+
<h3 id="reverse">
|
|
955
|
+
<code>reverse</code>
|
|
956
|
+
</h3>
|
|
957
|
+
|
|
958
|
+
<p>
|
|
959
|
+
Reverses the order of characters in the value.
|
|
960
|
+
</p>
|
|
961
|
+
|
|
962
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
963
|
+
<span class="na">text</span><span class="pi">:</span> <span class="s">Hello</span>
|
|
964
|
+
<span class="nn">---</span>
|
|
965
|
+
|
|
966
|
+
[%text:reverse]
|
|
967
|
+
<span class="c"><!-- Outputs: olleH --></span>
|
|
968
|
+
</code></pre>
|
|
969
|
+
|
|
970
|
+
<h2 id="array-transforms">
|
|
971
|
+
Array Transforms
|
|
972
|
+
</h2>
|
|
973
|
+
|
|
974
|
+
<h3 id="splitdelimiter">
|
|
975
|
+
<code>split(DELIMITER)</code>
|
|
976
|
+
</h3>
|
|
977
|
+
|
|
978
|
+
<p>
|
|
979
|
+
Splits a string into an array using the specified delimiter (default: space).
|
|
980
|
+
</p>
|
|
981
|
+
|
|
982
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
983
|
+
<span class="na">tags</span><span class="pi">:</span> <span class="s">tag1,tag2,tag3</span>
|
|
984
|
+
<span class="nn">---</span>
|
|
985
|
+
|
|
986
|
+
[%tags:split(,)]
|
|
987
|
+
<span class="c"><!-- Outputs: tag1 (first element as representation) --></span>
|
|
988
|
+
<span class="c"><!-- Use with :first, :last, :slice, or :join to work with the array --></span>
|
|
989
|
+
</code></pre>
|
|
990
|
+
|
|
991
|
+
<h3 id="joindelimiter">
|
|
992
|
+
<code>join(DELIMITER)</code>
|
|
993
|
+
</h3>
|
|
994
|
+
|
|
995
|
+
<p>
|
|
996
|
+
Joins an array into a string using the specified delimiter.
|
|
997
|
+
</p>
|
|
998
|
+
|
|
999
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1000
|
+
<span class="na">tags</span><span class="pi">:</span> <span class="s">tag1,tag2,tag3</span>
|
|
1001
|
+
<span class="nn">---</span>
|
|
1002
|
+
|
|
1003
|
+
[%tags:split(,):join( | )]
|
|
1004
|
+
<span class="c"><!-- Outputs: tag1 | tag2 | tag3 --></span>
|
|
1005
|
+
</code></pre>
|
|
1006
|
+
|
|
1007
|
+
<h3 id="first">
|
|
1008
|
+
<code>first</code>
|
|
1009
|
+
</h3>
|
|
1010
|
+
|
|
1011
|
+
<p>
|
|
1012
|
+
Returns the first element of an array.
|
|
1013
|
+
</p>
|
|
1014
|
+
|
|
1015
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1016
|
+
<span class="na">tags</span><span class="pi">:</span> <span class="s">tag1,tag2,tag3</span>
|
|
1017
|
+
<span class="nn">---</span>
|
|
1018
|
+
|
|
1019
|
+
[%tags:split(,):first]
|
|
1020
|
+
<span class="c"><!-- Outputs: tag1 --></span>
|
|
1021
|
+
</code></pre>
|
|
1022
|
+
|
|
1023
|
+
<h3 id="last">
|
|
1024
|
+
<code>last</code>
|
|
1025
|
+
</h3>
|
|
1026
|
+
|
|
1027
|
+
<p>
|
|
1028
|
+
Returns the last element of an array.
|
|
1029
|
+
</p>
|
|
1030
|
+
|
|
1031
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1032
|
+
<span class="na">tags</span><span class="pi">:</span> <span class="s">tag1,tag2,tag3</span>
|
|
1033
|
+
<span class="nn">---</span>
|
|
1034
|
+
|
|
1035
|
+
[%tags:split(,):last]
|
|
1036
|
+
<span class="c"><!-- Outputs: tag3 --></span>
|
|
1037
|
+
</code></pre>
|
|
1038
|
+
|
|
1039
|
+
<h3 id="slicestartlength">
|
|
1040
|
+
<code>slice(START,LENGTH)</code>
|
|
1041
|
+
</h3>
|
|
1042
|
+
|
|
1043
|
+
<p>
|
|
1044
|
+
Extracts a slice from an array. If applied to a non-array value, splits the string into individual characters.
|
|
1045
|
+
</p>
|
|
1046
|
+
|
|
1047
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1048
|
+
<span class="na">tags</span><span class="pi">:</span> <span class="s">tag1,tag2,tag3</span>
|
|
1049
|
+
<span class="nn">---</span>
|
|
1050
|
+
|
|
1051
|
+
[%tags:split(,):slice(0,2):join(,)]
|
|
1052
|
+
<span class="c"><!-- Outputs: tag1,tag2 --></span>
|
|
1053
|
+
<span class="p">
|
|
1054
|
+
---</span>
|
|
1055
|
+
<span class="gh">text: Hello
|
|
1056
|
+
---
|
|
1057
|
+
</span>
|
|
1058
|
+
[%text:slice(0,5)]
|
|
1059
|
+
<span class="c"><!-- Outputs: Hello (characters 0-5) --></span>
|
|
1060
|
+
</code></pre>
|
|
1061
|
+
|
|
1062
|
+
<h2 id="utility-transforms">
|
|
1063
|
+
Utility Transforms
|
|
1064
|
+
</h2>
|
|
1065
|
+
|
|
1066
|
+
<h3 id="defaultvalue">
|
|
1067
|
+
<code>default(VALUE)</code>
|
|
1068
|
+
</h3>
|
|
1069
|
+
|
|
1070
|
+
<p>
|
|
1071
|
+
Returns the specified default value if the metadata value is empty.
|
|
1072
|
+
</p>
|
|
1073
|
+
|
|
1074
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1075
|
+
<span class="na">desc</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span>
|
|
1076
|
+
<span class="nn">---</span>
|
|
1077
|
+
|
|
1078
|
+
[%desc:default(No description)]
|
|
1079
|
+
<span class="c"><!-- Outputs: No description --></span>
|
|
1080
|
+
</code></pre>
|
|
1081
|
+
|
|
1082
|
+
<h3 id="escape-htmlescape">
|
|
1083
|
+
<code>escape</code> / <code>html_escape</code>
|
|
1084
|
+
</h3>
|
|
1085
|
+
|
|
1086
|
+
<p>
|
|
1087
|
+
Escapes HTML special characters (<code>&</code>, <code><</code>, <code>></code>, <code>"</code>, <code>'</code>).
|
|
1088
|
+
</p>
|
|
1089
|
+
|
|
1090
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1091
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">A & B</span>
|
|
1092
|
+
<span class="nn">---</span>
|
|
1093
|
+
|
|
1094
|
+
[%title:html_escape]
|
|
1095
|
+
<span class="c"><!-- Outputs: A &amp; B --></span>
|
|
1096
|
+
</code></pre>
|
|
1097
|
+
|
|
1098
|
+
<h3 id="basename">
|
|
1099
|
+
<code>basename</code>
|
|
1100
|
+
</h3>
|
|
1101
|
+
|
|
1102
|
+
<p>
|
|
1103
|
+
Extracts the filename from a path.
|
|
1104
|
+
</p>
|
|
1105
|
+
|
|
1106
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1107
|
+
<span class="na">image</span><span class="pi">:</span> <span class="s">/path/to/image.jpg</span>
|
|
1108
|
+
<span class="nn">---</span>
|
|
1109
|
+
|
|
1110
|
+
[%image:basename]
|
|
1111
|
+
<span class="c"><!-- Outputs: image.jpg --></span>
|
|
1112
|
+
</code></pre>
|
|
1113
|
+
|
|
1114
|
+
<h3 id="urlencode">
|
|
1115
|
+
<code>urlencode</code>
|
|
1116
|
+
</h3>
|
|
1117
|
+
|
|
1118
|
+
<p>
|
|
1119
|
+
URL-encodes the value.
|
|
1120
|
+
</p>
|
|
1121
|
+
|
|
1122
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1123
|
+
<span class="na">search</span><span class="pi">:</span> <span class="s">hello world</span>
|
|
1124
|
+
<span class="nn">---</span>
|
|
1125
|
+
|
|
1126
|
+
[%search:urlencode]
|
|
1127
|
+
<span class="c"><!-- Outputs: hello%20world --></span>
|
|
1128
|
+
</code></pre>
|
|
1129
|
+
|
|
1130
|
+
<h3 id="urldecode">
|
|
1131
|
+
<code>urldecode</code>
|
|
1132
|
+
</h3>
|
|
1133
|
+
|
|
1134
|
+
<p>
|
|
1135
|
+
URL-decodes the value.
|
|
1136
|
+
</p>
|
|
1137
|
+
|
|
1138
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1139
|
+
<span class="na">search</span><span class="pi">:</span> <span class="s">hello%20world</span>
|
|
1140
|
+
<span class="nn">---</span>
|
|
1141
|
+
|
|
1142
|
+
[%search:urldecode]
|
|
1143
|
+
<span class="c"><!-- Outputs: hello world --></span>
|
|
1144
|
+
</code></pre>
|
|
1145
|
+
|
|
1146
|
+
<h3 id="prefixvalue">
|
|
1147
|
+
<code>prefix(VALUE)</code>
|
|
1148
|
+
</h3>
|
|
1149
|
+
|
|
1150
|
+
<p>
|
|
1151
|
+
Adds a prefix to the value.
|
|
1152
|
+
</p>
|
|
1153
|
+
|
|
1154
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1155
|
+
<span class="na">url</span><span class="pi">:</span> <span class="s">example.com</span>
|
|
1156
|
+
<span class="nn">---</span>
|
|
1157
|
+
|
|
1158
|
+
[%url:prefix(https://)]
|
|
1159
|
+
<span class="c"><!-- Outputs: https://example.com --></span>
|
|
1160
|
+
</code></pre>
|
|
1161
|
+
|
|
1162
|
+
<h3 id="suffixvalue">
|
|
1163
|
+
<code>suffix(VALUE)</code>
|
|
1164
|
+
</h3>
|
|
1165
|
+
|
|
1166
|
+
<p>
|
|
1167
|
+
Adds a suffix to the value.
|
|
1168
|
+
</p>
|
|
1169
|
+
|
|
1170
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1171
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">Hello</span>
|
|
1172
|
+
<span class="nn">---</span>
|
|
1173
|
+
|
|
1174
|
+
[%title:suffix(!)]
|
|
1175
|
+
<span class="c"><!-- Outputs: Hello! --></span>
|
|
1176
|
+
</code></pre>
|
|
1177
|
+
|
|
1178
|
+
<h3 id="removestring">
|
|
1179
|
+
<code>remove(STRING)</code>
|
|
1180
|
+
</h3>
|
|
1181
|
+
|
|
1182
|
+
<p>
|
|
1183
|
+
Removes all occurrences of the specified string.
|
|
1184
|
+
</p>
|
|
1185
|
+
|
|
1186
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1187
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">Hello'World</span>
|
|
1188
|
+
<span class="nn">---</span>
|
|
1189
|
+
|
|
1190
|
+
[%title:remove(')]
|
|
1191
|
+
<span class="c"><!-- Outputs: HelloWorld --></span>
|
|
1192
|
+
</code></pre>
|
|
1193
|
+
|
|
1194
|
+
<h3 id="repeatcount">
|
|
1195
|
+
<code>repeat(COUNT)</code>
|
|
1196
|
+
</h3>
|
|
1197
|
+
|
|
1198
|
+
<p>
|
|
1199
|
+
Repeats the value the specified number of times.
|
|
1200
|
+
</p>
|
|
1201
|
+
|
|
1202
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1203
|
+
<span class="na">sep</span><span class="pi">:</span> <span class="s">-</span>
|
|
1204
|
+
<span class="nn">---</span>
|
|
1205
|
+
|
|
1206
|
+
[%sep:repeat(3)]
|
|
1207
|
+
<span class="c"><!-- Outputs: --- --></span>
|
|
1208
|
+
</code></pre>
|
|
1209
|
+
|
|
1210
|
+
<h2 id="formatting-transforms">
|
|
1211
|
+
Formatting Transforms
|
|
1212
|
+
</h2>
|
|
1213
|
+
|
|
1214
|
+
<h3 id="formatformatstring">
|
|
1215
|
+
<code>format(FORMAT_STRING)</code>
|
|
1216
|
+
</h3>
|
|
1217
|
+
|
|
1218
|
+
<p>
|
|
1219
|
+
Formats a numeric value using <code>sprintf</code>-style formatting.
|
|
1220
|
+
</p>
|
|
1221
|
+
|
|
1222
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1223
|
+
<span class="na">price</span><span class="pi">:</span> <span class="m">42.5</span>
|
|
1224
|
+
<span class="nn">---</span>
|
|
1225
|
+
|
|
1226
|
+
[%price:format($%.2f)]
|
|
1227
|
+
<span class="c"><!-- Outputs: $42.50 --></span>
|
|
1228
|
+
</code></pre>
|
|
1229
|
+
|
|
1230
|
+
<h3 id="length">
|
|
1231
|
+
<code>length</code>
|
|
1232
|
+
</h3>
|
|
1233
|
+
|
|
1234
|
+
<p>
|
|
1235
|
+
Returns the length of the value as a string.
|
|
1236
|
+
</p>
|
|
1237
|
+
|
|
1238
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1239
|
+
<span class="na">text</span><span class="pi">:</span> <span class="s">Hello</span>
|
|
1240
|
+
<span class="nn">---</span>
|
|
1241
|
+
|
|
1242
|
+
[%text:length]
|
|
1243
|
+
<span class="c"><!-- Outputs: 5 --></span>
|
|
1244
|
+
</code></pre>
|
|
1245
|
+
|
|
1246
|
+
<h3 id="padwidthchar">
|
|
1247
|
+
<code>pad(WIDTH,CHAR)</code>
|
|
1248
|
+
</h3>
|
|
1249
|
+
|
|
1250
|
+
<p>
|
|
1251
|
+
Pads the value to the specified width with the specified character (default: space).
|
|
1252
|
+
</p>
|
|
1253
|
+
|
|
1254
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1255
|
+
<span class="na">number</span><span class="pi">:</span> <span class="m">42</span>
|
|
1256
|
+
<span class="nn">---</span>
|
|
1257
|
+
|
|
1258
|
+
[%number:pad(5,0)]
|
|
1259
|
+
<span class="c"><!-- Outputs: 00042 --></span>
|
|
1260
|
+
</code></pre>
|
|
1261
|
+
|
|
1262
|
+
<h3 id="containsstring">
|
|
1263
|
+
<code>contains(STRING)</code>
|
|
1264
|
+
</h3>
|
|
1265
|
+
|
|
1266
|
+
<p>
|
|
1267
|
+
Returns <code>"true"</code> if the value contains the specified string, <code>"false"</code> otherwise.
|
|
1268
|
+
</p>
|
|
1269
|
+
|
|
1270
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1271
|
+
<span class="na">tags</span><span class="pi">:</span> <span class="s">javascript,html,css</span>
|
|
1272
|
+
<span class="nn">---</span>
|
|
1273
|
+
|
|
1274
|
+
[%tags:contains(javascript)]
|
|
1275
|
+
<span class="c"><!-- Outputs: true --></span>
|
|
1276
|
+
</code></pre>
|
|
1277
|
+
|
|
1278
|
+
<h2 id="datetime-transforms">
|
|
1279
|
+
Date/Time Transforms
|
|
1280
|
+
</h2>
|
|
1281
|
+
|
|
1282
|
+
<h3 id="strftimeformat">
|
|
1283
|
+
<code>strftime(FORMAT)</code>
|
|
1284
|
+
</h3>
|
|
1285
|
+
|
|
1286
|
+
<p>
|
|
1287
|
+
Formats a date using <code>strftime</code>-style format strings. Parses dates in formats like <code>YYYY-MM-DD</code>, <code>YYYY-MM-DD HH:MM</code>, or <code>YYYY-MM-DD HHⓂ️SS</code>.
|
|
1288
|
+
</p>
|
|
1289
|
+
|
|
1290
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1291
|
+
<span class="na">date</span><span class="pi">:</span> <span class="s">2024-03-15</span>
|
|
1292
|
+
<span class="nn">---</span>
|
|
1293
|
+
|
|
1294
|
+
[%date:strftime(%Y)]
|
|
1295
|
+
<span class="c"><!-- Outputs: 2024 --></span>
|
|
1296
|
+
|
|
1297
|
+
[%date:strftime(%B %d, %Y)]
|
|
1298
|
+
<span class="c"><!-- Outputs: March 15, 2024 --></span>
|
|
1299
|
+
</code></pre>
|
|
1300
|
+
|
|
1301
|
+
<h2 id="transform-chaining">
|
|
1302
|
+
Transform Chaining
|
|
1303
|
+
</h2>
|
|
1304
|
+
|
|
1305
|
+
<p>
|
|
1306
|
+
Multiple transforms can be chained together using colons. Each transform operates on the result of the previous transform:
|
|
1307
|
+
</p>
|
|
1308
|
+
|
|
1309
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1310
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">hello world</span>
|
|
1311
|
+
<span class="nn">---</span>
|
|
1312
|
+
|
|
1313
|
+
[%title🐢split( ):first]
|
|
1314
|
+
<!--
|
|
1315
|
+
<span class="p"> 1.</span> title -> "Hello World"
|
|
1316
|
+
<span class="p"> 2.</span> split( ) -> ["Hello", "World"] (array)
|
|
1317
|
+
<span class="p"> 3.</span> first -> "Hello"
|
|
1318
|
+
-->
|
|
1319
|
+
</code></pre>
|
|
1320
|
+
|
|
1321
|
+
<p>
|
|
1322
|
+
<strong> Example with dates:</strong>
|
|
1323
|
+
</p>
|
|
1324
|
+
|
|
1325
|
+
<pre><code class="highlight language-markdown"><span class="nn">---</span>
|
|
1326
|
+
<span class="na">date</span><span class="pi">:</span> <span class="s">2024-03-15 14:30</span>
|
|
1327
|
+
<span class="nn">---</span>
|
|
1328
|
+
|
|
1329
|
+
[%date:strftime(%Y)]
|
|
1330
|
+
<span class="c"><!-- Outputs: 2024 --></span>
|
|
1331
|
+
</code></pre>
|
|
1332
|
+
|
|
1333
|
+
<h2 id="notes">
|
|
1334
|
+
Notes
|
|
1335
|
+
</h2>
|
|
1336
|
+
|
|
1337
|
+
<ul>
|
|
1338
|
+
|
|
1339
|
+
<li>
|
|
1340
|
+
Transforms are case-sensitive
|
|
1341
|
+
</li>
|
|
1342
|
+
|
|
1343
|
+
<li>
|
|
1344
|
+
Array transforms (<code>split</code>, <code>join</code>, <code>first</code>, <code>last</code>, <code>slice</code>) work together - use <code>split</code> to create an array, then apply other array transforms
|
|
1345
|
+
</li>
|
|
1346
|
+
|
|
1347
|
+
<li>
|
|
1348
|
+
The <code>slice</code> transform automatically converts non-array strings into character arrays if needed
|
|
1349
|
+
</li>
|
|
1350
|
+
|
|
1351
|
+
<li>
|
|
1352
|
+
Regex patterns in <code>replace</code> support POSIX Extended Regular Expressions and can include character classes like <code>[0-9]+</code>
|
|
1353
|
+
</li>
|
|
1354
|
+
|
|
1355
|
+
<li>
|
|
1356
|
+
Date parsing supports common formats but may not handle all date string formats
|
|
1357
|
+
</li>
|
|
1358
|
+
|
|
1359
|
+
<li>
|
|
1360
|
+
Unknown transforms are ignored and return the original value
|
|
1361
|
+
</li>
|
|
1362
|
+
|
|
1363
|
+
</ul>
|
|
1364
|
+
|
|
1365
|
+
<script>
|
|
1366
|
+
// Hamburger menu functionality
|
|
1367
|
+
(function() {
|
|
1368
|
+
function initHamburgerMenu() {
|
|
1369
|
+
var hamburger = document.getElementById('hamburger-menu');
|
|
1370
|
+
var sidebar = document.querySelector('.main-toc, .sidebar');
|
|
1371
|
+
var overlay = document.getElementById('mobile-menu-overlay');
|
|
1372
|
+
|
|
1373
|
+
if (!hamburger || !sidebar) return;
|
|
1374
|
+
|
|
1375
|
+
function toggleMenu() {
|
|
1376
|
+
var isOpen = sidebar.classList.contains('mobile-open');
|
|
1377
|
+
if (isOpen) {
|
|
1378
|
+
sidebar.classList.remove('mobile-open');
|
|
1379
|
+
hamburger.classList.remove('active');
|
|
1380
|
+
if (overlay) overlay.classList.remove('active');
|
|
1381
|
+
} else {
|
|
1382
|
+
sidebar.classList.add('mobile-open');
|
|
1383
|
+
hamburger.classList.add('active');
|
|
1384
|
+
if (overlay) overlay.classList.add('active');
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
hamburger.addEventListener('click', function(e) {
|
|
1389
|
+
e.stopPropagation();
|
|
1390
|
+
toggleMenu();
|
|
1391
|
+
});
|
|
1392
|
+
|
|
1393
|
+
if (overlay) {
|
|
1394
|
+
overlay.addEventListener('click', function() {
|
|
1395
|
+
toggleMenu();
|
|
1396
|
+
});
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
// Close menu when clicking on a sidebar link (mobile only)
|
|
1400
|
+
if (window.innerWidth <= 768) {
|
|
1401
|
+
var sidebarLinks = sidebar.querySelectorAll('a');
|
|
1402
|
+
sidebarLinks.forEach(function(link) {
|
|
1403
|
+
link.addEventListener('click', function() {
|
|
1404
|
+
setTimeout(function() {
|
|
1405
|
+
sidebar.classList.remove('mobile-open');
|
|
1406
|
+
hamburger.classList.remove('active');
|
|
1407
|
+
if (overlay) overlay.classList.remove('active');
|
|
1408
|
+
}, 100);
|
|
1409
|
+
});
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
// Close menu on window resize if going to desktop
|
|
1414
|
+
window.addEventListener('resize', function() {
|
|
1415
|
+
if (window.innerWidth > 768) {
|
|
1416
|
+
sidebar.classList.remove('mobile-open');
|
|
1417
|
+
hamburger.classList.remove('active');
|
|
1418
|
+
if (overlay) overlay.classList.remove('active');
|
|
1419
|
+
}
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
// Initialize when DOM is ready
|
|
1424
|
+
if (document.readyState === 'loading') {
|
|
1425
|
+
document.addEventListener('DOMContentLoaded', initHamburgerMenu);
|
|
1426
|
+
} else {
|
|
1427
|
+
initHamburgerMenu();
|
|
1428
|
+
}
|
|
1429
|
+
})();
|
|
1430
|
+
|
|
1431
|
+
</script>
|
|
1432
|
+
<script>
|
|
1433
|
+
(function() {
|
|
1434
|
+
// Clone the page TOC for floating TOC
|
|
1435
|
+
function initFloatingTOC() {
|
|
1436
|
+
var pageTOC = document.getElementById('page-toc-top');
|
|
1437
|
+
var floatingTOCContent = document.getElementById('floating-toc-content');
|
|
1438
|
+
var floatingTOC = document.getElementById('floating-toc');
|
|
1439
|
+
|
|
1440
|
+
if (!pageTOC || !floatingTOCContent || !floatingTOC) return;
|
|
1441
|
+
|
|
1442
|
+
// Clone the TOC structure
|
|
1443
|
+
var tocClone = pageTOC.cloneNode(true);
|
|
1444
|
+
tocClone.id = 'floating-toc-clone';
|
|
1445
|
+
floatingTOCContent.appendChild(tocClone);
|
|
1446
|
+
|
|
1447
|
+
// Update all links to use smooth scrolling
|
|
1448
|
+
var allTOCLinks = document.querySelectorAll('.page-toc a, .floating-toc-content a');
|
|
1449
|
+
allTOCLinks.forEach(function(link) {
|
|
1450
|
+
link.addEventListener('click', function(e) {
|
|
1451
|
+
var href = this.getAttribute('href');
|
|
1452
|
+
if (href && href.startsWith('#')) {
|
|
1453
|
+
e.preventDefault();
|
|
1454
|
+
var targetId = href.substring(1);
|
|
1455
|
+
var targetElement = document.getElementById(targetId);
|
|
1456
|
+
if (targetElement) {
|
|
1457
|
+
var offset = 20; // Offset from top
|
|
1458
|
+
|
|
1459
|
+
// Function to calculate absolute position from document top
|
|
1460
|
+
function getAbsoluteTop(element) {
|
|
1461
|
+
var top = 0;
|
|
1462
|
+
while (element) {
|
|
1463
|
+
top += element.offsetTop;
|
|
1464
|
+
element = element.offsetParent;
|
|
1465
|
+
}
|
|
1466
|
+
return top;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
var absoluteTop = getAbsoluteTop(targetElement);
|
|
1470
|
+
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
1471
|
+
var offsetPosition = absoluteTop - offset;
|
|
1472
|
+
|
|
1473
|
+
// Only scroll if we're not already at the target position
|
|
1474
|
+
if (Math.abs(scrollTop - offsetPosition) > 10) {
|
|
1475
|
+
window.scrollTo({
|
|
1476
|
+
top: Math.max(0, offsetPosition),
|
|
1477
|
+
behavior: 'smooth'
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
// Update URL hash without triggering scroll
|
|
1482
|
+
if (history.pushState) {
|
|
1483
|
+
history.pushState(null, null, href);
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
});
|
|
1488
|
+
});
|
|
1489
|
+
|
|
1490
|
+
// Handle scroll to show/hide floating TOC
|
|
1491
|
+
var tocTop = pageTOC.getBoundingClientRect().top + window.pageYOffset;
|
|
1492
|
+
var tocBottom = tocTop + pageTOC.offsetHeight;
|
|
1493
|
+
|
|
1494
|
+
function updateFloatingTOC() {
|
|
1495
|
+
var scrollY = window.pageYOffset || document.documentElement.scrollTop;
|
|
1496
|
+
|
|
1497
|
+
if (scrollY > tocBottom) {
|
|
1498
|
+
floatingTOC.classList.add('visible');
|
|
1499
|
+
} else {
|
|
1500
|
+
floatingTOC.classList.remove('visible');
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
// Throttle scroll events
|
|
1505
|
+
var ticking = false;
|
|
1506
|
+
window.addEventListener('scroll', function() {
|
|
1507
|
+
if (!ticking) {
|
|
1508
|
+
window.requestAnimationFrame(function() {
|
|
1509
|
+
updateFloatingTOC();
|
|
1510
|
+
ticking = false;
|
|
1511
|
+
});
|
|
1512
|
+
ticking = true;
|
|
1513
|
+
}
|
|
1514
|
+
});
|
|
1515
|
+
|
|
1516
|
+
// Initial check
|
|
1517
|
+
updateFloatingTOC();
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
// Initialize when DOM is ready
|
|
1521
|
+
if (document.readyState === 'loading') {
|
|
1522
|
+
document.addEventListener('DOMContentLoaded', initFloatingTOC);
|
|
1523
|
+
} else {
|
|
1524
|
+
initFloatingTOC();
|
|
1525
|
+
}
|
|
1526
|
+
})();
|
|
1527
|
+
</script>
|
|
1528
|
+
<footer class="page-footer"><p>Copyright 2025 Brett Terpstra, All Rights Reserved | MIT License</p></footer></body>
|
|
1529
|
+
|
|
1530
|
+
</html>
|
|
1531
|
+
|