apex-ruby 1.0.29 → 1.0.31
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 +4 -4
- data/README.md +2 -8
- data/apex-ruby.gemspec +14 -3
- data/ext/apex_ext/apex_src/include/apex/apex.h +11 -2
- data/ext/apex_ext/apex_src/src/apex.c +64 -5
- data/ext/apex_ext/apex_src/src/ast_terminal.c +2 -4
- data/ext/apex_ext/apex_src/src/extensions/callouts.c +103 -63
- data/ext/apex_ext/apex_src/src/extensions/callouts.h +3 -2
- data/ext/apex_ext/apex_src/src/extensions/citations.c +15 -2
- data/ext/apex_ext/apex_src/src/extensions/emoji.c +73 -7
- data/ext/apex_ext/apex_src/src/extensions/html_markdown.c +25 -4
- data/ext/apex_ext/apex_src/src/extensions/html_markdown.h +4 -1
- data/ext/apex_ext/apex_src/src/extensions/insert.c +49 -0
- data/ext/apex_ext/apex_src/src/extensions/metadata.c +275 -55
- data/ext/apex_ext/apex_src/src/extensions/metadata.h +9 -0
- data/ext/apex_ext/apex_src/src/extensions/relaxed_tables.c +172 -254
- data/ext/apex_ext/apex_src/src/extensions/table_html_postprocess.c +36 -127
- data/ext/apex_ext/apex_src/src/html_renderer.c +99 -157
- data/ext/apex_ext/extconf.rb +31 -79
- data/lib/apex/version.rb +1 -1
- metadata +1 -470
- data/ext/apex_ext/apex_src/AGENTS.md +0 -41
- data/ext/apex_ext/apex_src/BENCHMARK.md +0 -32
- data/ext/apex_ext/apex_src/BENCHMARK_COMPARISON.md +0 -67
- data/ext/apex_ext/apex_src/CHANGELOG.md +0 -3373
- data/ext/apex_ext/apex_src/CMakeLists.txt +0 -481
- data/ext/apex_ext/apex_src/Dockerfile.linux-build +0 -15
- data/ext/apex_ext/apex_src/Formula/apex.rb +0 -43
- data/ext/apex_ext/apex_src/Info.plist.in +0 -27
- data/ext/apex_ext/apex_src/Package.swift +0 -192
- data/ext/apex_ext/apex_src/PackageSupport/README.md +0 -17
- data/ext/apex_ext/apex_src/PackageSupport/cmark-gfm/cmark_gfm_spm_stub.c +0 -4
- data/ext/apex_ext/apex_src/README.md +0 -536
- data/ext/apex_ext/apex_src/ROADMAP.md +0 -5
- data/ext/apex_ext/apex_src/VERSION +0 -1
- data/ext/apex_ext/apex_src/apex-debug.log +0 -4
- data/ext/apex_ext/apex_src/apex-header-2-rb@2x.webp +0 -0
- data/ext/apex_ext/apex_src/apex-plugins.json.example +0 -20
- data/ext/apex_ext/apex_src/apex.code-workspace +0 -38
- data/ext/apex_ext/apex_src/apex.pc.in +0 -11
- data/ext/apex_ext/apex_src/apex.taskpaper +0 -12
- data/ext/apex_ext/apex_src/apex_deflist_debug.log +0 -25
- data/ext/apex_ext/apex_src/buildnotes.md +0 -1435
- data/ext/apex_ext/apex_src/cli/main.c +0 -4588
- data/ext/apex_ext/apex_src/debug.log +0 -7
- data/ext/apex_ext/apex_src/debug_test.sh +0 -22
- data/ext/apex_ext/apex_src/docs/API_REFERENCE.md +0 -451
- data/ext/apex_ext/apex_src/docs/ARCHITECTURE.md +0 -166
- data/ext/apex_ext/apex_src/docs/CITATIONS_EXAMPLES.md +0 -274
- data/ext/apex_ext/apex_src/docs/CITATIONS_IMPLEMENTATION_PLAN.md +0 -749
- data/ext/apex_ext/apex_src/docs/CITATIONS_PLAN.md +0 -744
- data/ext/apex_ext/apex_src/docs/CMARK_INTEGRATION.md +0 -220
- data/ext/apex_ext/apex_src/docs/CRITICMARKUP.md +0 -501
- data/ext/apex_ext/apex_src/docs/DEBUGGING.md +0 -73
- data/ext/apex_ext/apex_src/docs/FINAL_STATUS.md +0 -391
- data/ext/apex_ext/apex_src/docs/FINAL_STATUS_UPDATE.md +0 -237
- data/ext/apex_ext/apex_src/docs/IAL_FEATURES.md +0 -210
- data/ext/apex_ext/apex_src/docs/IAL_STATUS.md +0 -344
- data/ext/apex_ext/apex_src/docs/INDEX_IMPLEMENTATION_ANALYSIS.md +0 -382
- data/ext/apex_ext/apex_src/docs/INTEGRATION_EXAMPLE.m +0 -144
- data/ext/apex_ext/apex_src/docs/LIMITATIONS_RESOLVED.md +0 -278
- data/ext/apex_ext/apex_src/docs/OUTPUT_MODES.md +0 -321
- data/ext/apex_ext/apex_src/docs/PROGRESS.md +0 -167
- data/ext/apex_ext/apex_src/docs/STANDALONE_FEATURE.md +0 -174
- data/ext/apex_ext/apex_src/docs/TABLE_SPANS_STATUS.md +0 -243
- data/ext/apex_ext/apex_src/docs/TEST_COVERAGE.md +0 -316
- data/ext/apex_ext/apex_src/docs/USER_GUIDE.md +0 -803
- data/ext/apex_ext/apex_src/docs/WIKI_LINKS_ISSUE.md +0 -91
- data/ext/apex_ext/apex_src/docs/index.md +0 -459
- data/ext/apex_ext/apex_src/docs/plans/2025-02-27-man-page-output-implementation.md +0 -351
- data/ext/apex_ext/apex_src/docs/superpowers/plans/2026-07-12-toc-output-format.md +0 -745
- data/ext/apex_ext/apex_src/docs/superpowers/plans/2026-07-18-bear-image-attributes.md +0 -829
- data/ext/apex_ext/apex_src/docs/superpowers/plans/2026-07-19-apex-node-npm.md +0 -1148
- data/ext/apex_ext/apex_src/docs/superpowers/specs/2026-07-12-toc-output-format-design.md +0 -161
- data/ext/apex_ext/apex_src/docs/superpowers/specs/2026-07-18-bear-image-attributes-design.md +0 -184
- data/ext/apex_ext/apex_src/docs/superpowers/specs/2026-07-19-apex-node-npm-design.md +0 -211
- data/ext/apex_ext/apex_src/documentation/README.md +0 -160
- data/ext/apex_ext/apex_src/documentation/app-settings-table.md +0 -67
- data/ext/apex_ext/apex_src/documentation/app-transformed/Citations.md +0 -340
- data/ext/apex_ext/apex_src/documentation/app-transformed/Credits.md +0 -11
- data/ext/apex_ext/apex_src/documentation/app-transformed/Header-IDs.md +0 -234
- data/ext/apex_ext/apex_src/documentation/app-transformed/Inline-Attribute-Lists.md +0 -516
- data/ext/apex_ext/apex_src/documentation/app-transformed/Metadata-Transforms.md +0 -461
- data/ext/apex_ext/apex_src/documentation/app-transformed/Modes.md +0 -193
- data/ext/apex_ext/apex_src/documentation/app-transformed/Multi-File-Documents.md +0 -201
- data/ext/apex_ext/apex_src/documentation/app-transformed/Plugins.md +0 -678
- data/ext/apex_ext/apex_src/documentation/app-transformed/Syntax.md +0 -1367
- data/ext/apex_ext/apex_src/documentation/docsets/Apex Command Line Options.cheatsheet.txt +0 -371
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Info.plist +0 -24
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/C-API.html +0 -2211
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Callouts.html +0 -1194
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Citations.html +0 -1620
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Command-Line-Options.html +0 -6024
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Configuration.html +0 -1877
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Credits.html +0 -1040
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Examples.html +0 -1402
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Filters.html +0 -1656
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Generating-Man-Pages.html +0 -1226
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Getting-Started.html +0 -1148
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Header-IDs.html +0 -1478
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Home.html +0 -1225
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Indices.html +0 -2327
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Inline-Attribute-Lists.html +0 -2041
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Installation.html +0 -1314
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Limitations-and-Roadmap.html +0 -1868
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Metadata-Transforms.html +0 -1731
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Modes.html +0 -2242
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Multi-File-Documents.html +0 -1533
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Multi-Format-Images.html +0 -1362
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Pandoc-Integration.html +0 -1338
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Plugins.html +0 -3188
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Quarto-Mode.html +0 -1405
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Rendering-Markdown-In-Terminal.html +0 -1902
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Syntax.html +0 -4222
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Tables.html +0 -1781
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Troubleshooting.html +0 -1629
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Usage.html +0 -1394
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Using-Apex-with-Jekyll.html +0 -1132
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Writing-Tests.html +0 -1754
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Xcode-Integration.html +0 -2562
- 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/ApexCLI.docset/Contents/Info.plist +0 -22
- 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 +0 -914
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/style.css +0 -399
- 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 +0 -772
- data/ext/apex_ext/apex_src/documentation/generate_app_docs_ai.rb +0 -678
- data/ext/apex_ext/apex_src/documentation/generate_docset.rb +0 -873
- data/ext/apex_ext/apex_src/documentation/generate_single_html.rb +0 -733
- data/ext/apex_ext/apex_src/documentation/html/apex-app-docs.html +0 -8746
- data/ext/apex_ext/apex_src/documentation/html/apex-docs.html +0 -17073
- data/ext/apex_ext/apex_src/documentation/shared_scripts.js +0 -64
- data/ext/apex_ext/apex_src/documentation/shared_styles.css +0 -651
- data/ext/apex_ext/apex_src/documentation/transform_for_app.example.md +0 -260
- data/ext/apex_ext/apex_src/documentation/transform_for_app.md +0 -55
- data/ext/apex_ext/apex_src/escaping-repro.md +0 -103
- data/ext/apex_ext/apex_src/examples/bracketed_spans_demo.md +0 -119
- data/ext/apex_ext/apex_src/examples/emoji_span_plugin.yml +0 -11
- data/ext/apex_ext/apex_src/examples/example.html +0 -53
- data/ext/apex_ext/apex_src/examples/example.md +0 -85
- data/ext/apex_ext/apex_src/examples/fenced_divs_demo.md +0 -158
- data/ext/apex_ext/apex_src/examples/kbd.md +0 -8
- data/ext/apex_ext/apex_src/examples/kbd_plugin.rb +0 -250
- data/ext/apex_ext/apex_src/examples/kbd_plugin.yml +0 -9
- data/ext/apex_ext/apex_src/examples/quick-actions/Markdown to RTF.workflow/Contents/Info.plist +0 -8
- data/ext/apex_ext/apex_src/examples/quick-actions/Markdown to RTF.workflow/Contents/QuickLook/Preview.png +0 -0
- data/ext/apex_ext/apex_src/examples/quick-actions/Markdown to RTF.workflow/Contents/document.wflow +0 -547
- data/ext/apex_ext/apex_src/examples/quick-actions/Markdown-to-RTF.workflow.zip +0 -0
- data/ext/apex_ext/apex_src/examples/quick-actions/README.md +0 -33
- data/ext/apex_ext/apex_src/ial.html +0 -24
- 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/man/apex-config.5 +0 -455
- data/ext/apex_ext/apex_src/man/apex-config.5.md +0 -262
- data/ext/apex_ext/apex_src/man/apex-plugins.7 +0 -541
- data/ext/apex_ext/apex_src/man/apex-plugins.7.md +0 -365
- data/ext/apex_ext/apex_src/man/apex.1 +0 -583
- data/ext/apex_ext/apex_src/man/apex.1.html +0 -703
- data/ext/apex_ext/apex_src/man/apex.1.md +0 -803
- data/ext/apex_ext/apex_src/man/apex.1.new +0 -338
- data/ext/apex_ext/apex_src/objc/Apex.swift +0 -316
- data/ext/apex_ext/apex_src/objc/ApexPlugins.swift +0 -79
- data/ext/apex_ext/apex_src/objc/NSString+Apex.h +0 -207
- data/ext/apex_ext/apex_src/objc/NSString+Apex.m +0 -584
- data/ext/apex_ext/apex_src/objc/NSString+ApexPlugins.h +0 -76
- data/ext/apex_ext/apex_src/objc/NSString+ApexPlugins.m +0 -169
- data/ext/apex_ext/apex_src/output.html +0 -87
- data/ext/apex_ext/apex_src/pages/index.md +0 -459
- data/ext/apex_ext/apex_src/plans/quarto-mode.md +0 -442
- data/ext/apex_ext/apex_src/src/_README.md +0 -413
- data/ext/apex_ext/apex_src/src/extensions/github-emoji.txt +0 -869
- data/ext/apex_ext/apex_src/test-linux-build.sh +0 -20
- data/ext/apex_ext/apex_src/test.html +0 -103
- data/ext/apex_ext/apex_src/test_coverage.sh +0 -121
- data/ext/apex_ext/apex_src/test_ial_fenced.md +0 -6
- data/ext/apex_ext/apex_src/test_math_norm.py +0 -79
- data/ext/apex_ext/apex_src/test_pandoc_output.html +0 -48
- data/ext/apex_ext/apex_src/test_spm.sh +0 -107
- data/ext/apex_ext/apex_src/tests/ApexSPMTest/main.swift +0 -50
- data/ext/apex_ext/apex_src/tests/BENCHMARK_RESULTS.md +0 -229
- data/ext/apex_ext/apex_src/tests/CMakeLists.txt +0 -25
- data/ext/apex_ext/apex_src/tests/README.md +0 -152
- data/ext/apex_ext/apex_src/tests/benchmark.sh +0 -113
- data/ext/apex_ext/apex_src/tests/benchmark_comparison.sh +0 -166
- data/ext/apex_ext/apex_src/tests/compare_header_ids.sh +0 -31
- data/ext/apex_ext/apex_src/tests/fixtures/basic/headers.md +0 -25
- data/ext/apex_ext/apex_src/tests/fixtures/basic/list-interruption.md +0 -24
- data/ext/apex_ext/apex_src/tests/fixtures/basic/misc_markup.md +0 -33
- data/ext/apex_ext/apex_src/tests/fixtures/basic/test_basic.md +0 -26
- data/ext/apex_ext/apex_src/tests/fixtures/code/code-blocks.md +0 -260
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/SUMMARY.md +0 -6
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/chapter1.md +0 -7
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/index.txt +0 -9
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/intro.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/section1_1.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/comprehensive_test.md +0 -652
- data/ext/apex_ext/apex_src/tests/fixtures/debug_ref_image_ial.md +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/demos/ial.md +0 -11
- data/ext/apex_ext/apex_src/tests/fixtures/demos/ial_demo.md +0 -177
- data/ext/apex_ext/apex_src/tests/fixtures/extensions/emoji-autocorrect.md +0 -94
- data/ext/apex_ext/apex_src/tests/fixtures/extensions/emoji_test.md +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/extensions/kbd_test.md +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/filters/filter_output_with_rawblock.json +0 -1
- data/ext/apex_ext/apex_src/tests/fixtures/filters/unwrap.md +0 -7
- data/ext/apex_ext/apex_src/tests/fixtures/ial/bracketed_spans_test.md +0 -74
- data/ext/apex_ext/apex_src/tests/fixtures/images/auto-wildcard.md +0 -8
- data/ext/apex_ext/apex_src/tests/fixtures/images/bear_image_attributes.md +0 -10
- data/ext/apex_ext/apex_src/tests/fixtures/images/image_and_encoding_test.md +0 -27
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu.avif +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu.jpg +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu.webp +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu@2x.avif +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu@2x.jpg +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu@2x.webp +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/media_formats_test.md +0 -63
- data/ext/apex_ext/apex_src/tests/fixtures/images/multimarkdown_image_attributes_test.md +0 -60
- data/ext/apex_ext/apex_src/tests/fixtures/images/pandoc_ial_image_test.md +0 -27
- data/ext/apex_ext/apex_src/tests/fixtures/images/width_height_conversion_test.md +0 -94
- data/ext/apex_ext/apex_src/tests/fixtures/img-in-div.md +0 -16
- data/ext/apex_ext/apex_src/tests/fixtures/includes/code.py +0 -4
- data/ext/apex_ext/apex_src/tests/fixtures/includes/data-semi.csv +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/includes/data.csv +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/includes/data.tsv +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/includes/image.png +0 -2
- data/ext/apex_ext/apex_src/tests/fixtures/includes/metadata_options.yml +0 -11
- data/ext/apex_ext/apex_src/tests/fixtures/includes/nested.md +0 -8
- data/ext/apex_ext/apex_src/tests/fixtures/includes/raw.html +0 -4
- data/ext/apex_ext/apex_src/tests/fixtures/includes/sections.md +0 -19
- data/ext/apex_ext/apex_src/tests/fixtures/includes/sections.txt +0 -11
- data/ext/apex_ext/apex_src/tests/fixtures/includes/simple.md +0 -7
- data/ext/apex_ext/apex_src/tests/fixtures/includes/test_image.png +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/with space.txt +0 -1
- data/ext/apex_ext/apex_src/tests/fixtures/large_doc.md +0 -1094
- data/ext/apex_ext/apex_src/tests/fixtures/metadata/mmd-metadata.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/metadata/pandoc-meta.md +0 -4
- data/ext/apex_ext/apex_src/tests/fixtures/metadata/yaml-frontmatter.md +0 -6
- data/ext/apex_ext/apex_src/tests/fixtures/metadata_options.yml +0 -11
- data/ext/apex_ext/apex_src/tests/fixtures/minimal_pb.md +0 -2
- data/ext/apex_ext/apex_src/tests/fixtures/obsidian-callouts.md +0 -46
- data/ext/apex_ext/apex_src/tests/fixtures/output/gfm_header_id_test.md +0 -96
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_citations.md +0 -43
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_def_list_links.md +0 -12
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_index_mmark.md +0 -53
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_index_textindex.md +0 -37
- data/ext/apex_ext/apex_src/tests/fixtures/pagebreak_html_repro.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/python-callouts.md +0 -47
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/callouts.md +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/code-attrs.md +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/diagrams.md +0 -8
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/lists.md +0 -19
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/raw-content.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/shortcodes.md +0 -7
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/smoke.md +0 -81
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/spans.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/quarto-callouts.md +0 -47
- data/ext/apex_ext/apex_src/tests/fixtures/speed.md +0 -192
- data/ext/apex_ext/apex_src/tests/fixtures/tables/advanced_tables_test.md +0 -93
- data/ext/apex_ext/apex_src/tests/fixtures/tables/grid-tables.md +0 -37
- data/ext/apex_ext/apex_src/tests/fixtures/tables/inline_tables_test.md +0 -41
- data/ext/apex_ext/apex_src/tests/fixtures/tables/relaxed-table.md +0 -12
- data/ext/apex_ext/apex_src/tests/fixtures/tables/table_cr_line_endings.md +0 -15
- data/ext/apex_ext/apex_src/tests/fixtures/tables/table_no_trailing_newline.md +0 -15
- data/ext/apex_ext/apex_src/tests/generate_gfm_ids.sh +0 -105
- data/ext/apex_ext/apex_src/tests/generate_ial_demo.sh +0 -143
- data/ext/apex_ext/apex_src/tests/gfm_id_comparison_summary.md +0 -96
- data/ext/apex_ext/apex_src/tests/gh_api_test.md +0 -6
- data/ext/apex_ext/apex_src/tests/ial_demo.html +0 -186
- data/ext/apex_ext/apex_src/tests/include_code.py +0 -19
- data/ext/apex_ext/apex_src/tests/include_snippet.md +0 -15
- data/ext/apex_ext/apex_src/tests/metadata_cli_test.sh +0 -119
- data/ext/apex_ext/apex_src/tests/multi_file_cli_test.sh +0 -64
- data/ext/apex_ext/apex_src/tests/paginate_cli_test.sh +0 -80
- data/ext/apex_ext/apex_src/tests/sample_data.csv +0 -7
- data/ext/apex_ext/apex_src/tests/table_escaped_ltlt.md +0 -4
- data/ext/apex_ext/apex_src/tests/terminal_width_test.sh +0 -29
- data/ext/apex_ext/apex_src/tests/test-swift-package.sh +0 -14
- data/ext/apex_ext/apex_src/tests/test_basic.c +0 -74
- data/ext/apex_ext/apex_src/tests/test_bear_image_attrs.c +0 -301
- data/ext/apex_ext/apex_src/tests/test_cmark_callback.c +0 -189
- data/ext/apex_ext/apex_src/tests/test_concordance.tsv +0 -4
- data/ext/apex_ext/apex_src/tests/test_custom_plugins.c +0 -78
- data/ext/apex_ext/apex_src/tests/test_escaping_repro.c +0 -82
- data/ext/apex_ext/apex_src/tests/test_extensions.c +0 -3337
- data/ext/apex_ext/apex_src/tests/test_helpers.c +0 -183
- data/ext/apex_ext/apex_src/tests/test_helpers.h +0 -91
- data/ext/apex_ext/apex_src/tests/test_ial.c +0 -289
- data/ext/apex_ext/apex_src/tests/test_links.c +0 -418
- data/ext/apex_ext/apex_src/tests/test_marked_integration.c +0 -290
- data/ext/apex_ext/apex_src/tests/test_metadata.c +0 -1147
- data/ext/apex_ext/apex_src/tests/test_output.c +0 -2056
- data/ext/apex_ext/apex_src/tests/test_plugins.c +0 -219
- data/ext/apex_ext/apex_src/tests/test_refs.bib +0 -31
- data/ext/apex_ext/apex_src/tests/test_runner.c +0 -268
- data/ext/apex_ext/apex_src/tests/test_syntax_highlight.c +0 -198
- data/ext/apex_ext/apex_src/tests/test_tables.c +0 -1298
- data/ext/apex_ext/apex_src/tests/update_benchmarks.sh +0 -9
- data/ext/apex_ext/apex_src/tests/yaml_test.md +0 -13
- data/ext/apex_ext/apex_src/tests.rb +0 -39
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/CMakeLists.txt +0 -48
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/CheckFileOffsetBits.c +0 -14
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/CheckFileOffsetBits.cmake +0 -43
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/FindAsan.cmake +0 -74
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/Makefile.nmake +0 -38
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/README.md +0 -206
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/CMakeLists.txt +0 -30
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/cplusplus.cpp +0 -15
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/cplusplus.h +0 -16
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/harness.c +0 -111
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/harness.h +0 -35
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/main.c +0 -1169
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/appveyor.yml +0 -21
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-bq-flat.md +0 -16
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-bq-nested.md +0 -13
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-code.md +0 -11
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-fences.md +0 -14
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-heading.md +0 -9
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-hr.md +0 -10
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-html.md +0 -32
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-lheading.md +0 -8
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-list-flat.md +0 -67
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-list-nested.md +0 -36
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-ref-flat.md +0 -15
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-ref-nested.md +0 -17
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-autolink.md +0 -14
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-backticks.md +0 -3
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-flat.md +0 -5
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-nested.md +0 -5
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-worst.md +0 -5
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-entity.md +0 -11
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-escape.md +0 -15
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-html.md +0 -44
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-links-flat.md +0 -23
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-links-nested.md +0 -13
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-newlines.md +0 -24
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/lorem1.md +0 -13
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/rawtabs.md +0 -18
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/statistics.py +0 -595
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/stats.py +0 -19
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/benchmarks.md +0 -33
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/changelog.txt +0 -1245
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/data/CaseFolding.txt +0 -1495
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/CMakeLists.txt +0 -119
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/ext_scanners.re +0 -92
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/CMakeLists.txt +0 -22
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/README.md +0 -12
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzz_quadratic.c +0 -91
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzz_quadratic_brackets.c +0 -110
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzzloop.sh +0 -28
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/CMakeLists.txt +0 -10
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/make_man_page.py +0 -133
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/man1/cmark-gfm.1 +0 -78
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/man3/cmark-gfm.3 +0 -1041
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/nmake.bat +0 -1
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/CMakeLists.txt +0 -230
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark-gfm_version.h.in +0 -7
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/config.h +0 -38
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/config.h.in +0 -76
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/libcmark-gfm.pc.in +0 -10
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/scanners.re +0 -365
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/suppressions +0 -10
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/CMakeLists.txt +0 -114
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/__pycache__/cmark.cpython-314.pyc +0 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/__pycache__/normalize.cpython-314.pyc +0 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/afl_test_cases/test.md +0 -49
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/cmark-fuzz.c +0 -58
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/cmark.py +0 -105
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/entity_tests.py +0 -67
- 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 +0 -38
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/extensions.txt +0 -989
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/fuzzing_dictionary +0 -67
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/normalize.py +0 -194
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/pathological_tests.py +0 -160
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/regression.txt +0 -375
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/roundtrip_tests.py +0 -50
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/run-cmark-fuzz +0 -4
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/smart_punct.txt +0 -177
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/spec.txt +0 -10212
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/spec_tests.py +0 -152
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/toolchain-mingw32.cmake +0 -17
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/Dockerfile +0 -41
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/appveyor-build.bat +0 -13
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/make_entities_inc.py +0 -32
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/mkcasefold.pl +0 -22
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/xml2md.xsl +0 -319
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/xml2md_gfm.xsl +0 -80
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/why-cmark-and-not-x.md +0 -104
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.js +0 -6
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.py +0 -37
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.rb +0 -15
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.rkt +0 -208
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper_ext.py +0 -109
- data/ext/apex_ext/apex_src/vendor/libyaml/CMakeLists.txt +0 -160
- data/ext/apex_ext/apex_src/vendor/libyaml/Changes +0 -372
- data/ext/apex_ext/apex_src/vendor/libyaml/License +0 -20
- data/ext/apex_ext/apex_src/vendor/libyaml/Makefile.am +0 -51
- data/ext/apex_ext/apex_src/vendor/libyaml/ReadMe.md +0 -46
- data/ext/apex_ext/apex_src/vendor/libyaml/announcement.msg +0 -89
- data/ext/apex_ext/apex_src/vendor/libyaml/bootstrap +0 -3
- data/ext/apex_ext/apex_src/vendor/libyaml/cmake/config.h.in +0 -4
- data/ext/apex_ext/apex_src/vendor/libyaml/configure.ac +0 -73
- data/ext/apex_ext/apex_src/vendor/libyaml/doc/doxygen.cfg +0 -222
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/README.mkd +0 -17
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/alpine-3.7 +0 -26
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/fedora-25 +0 -26
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/ubuntu-14.04 +0 -29
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/ubuntu-16.04 +0 -24
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/anchors.yaml +0 -10
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/array.yaml +0 -2
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/global-tag.yaml +0 -14
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/json.yaml +0 -1
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/mapping.yaml +0 -2
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/numbers.yaml +0 -1
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/strings.yaml +0 -7
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/tags.yaml +0 -7
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/yaml-version.yaml +0 -3
- data/ext/apex_ext/apex_src/vendor/libyaml/include/Makefile.am +0 -17
- data/ext/apex_ext/apex_src/vendor/libyaml/include/yaml.h +0 -1999
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/ReadMe.md +0 -77
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/Dockerfile +0 -32
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/output/ReadMe +0 -1
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/scripts/libyaml-dist.sh +0 -23
- data/ext/apex_ext/apex_src/vendor/libyaml/regression-inputs/clusterfuzz-testcase-minimized-5607885063061504.yml +0 -1
- data/ext/apex_ext/apex_src/vendor/libyaml/src/Makefile.am +0 -4
- data/ext/apex_ext/apex_src/vendor/libyaml/src/api.c +0 -1393
- data/ext/apex_ext/apex_src/vendor/libyaml/src/dumper.c +0 -394
- data/ext/apex_ext/apex_src/vendor/libyaml/src/emitter.c +0 -2358
- data/ext/apex_ext/apex_src/vendor/libyaml/src/loader.c +0 -544
- data/ext/apex_ext/apex_src/vendor/libyaml/src/parser.c +0 -1416
- data/ext/apex_ext/apex_src/vendor/libyaml/src/reader.c +0 -469
- data/ext/apex_ext/apex_src/vendor/libyaml/src/scanner.c +0 -3598
- data/ext/apex_ext/apex_src/vendor/libyaml/src/writer.c +0 -141
- data/ext/apex_ext/apex_src/vendor/libyaml/src/yaml_private.h +0 -684
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/CMakeLists.txt +0 -27
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/Makefile.am +0 -9
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/ReadMe.md +0 -63
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-deconstructor-alt.c +0 -800
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-deconstructor.c +0 -1127
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-reformatter-alt.c +0 -217
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-reformatter.c +0 -202
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-all-tests.sh +0 -29
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-dumper.c +0 -314
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-emitter-test-suite.c +0 -290
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-emitter.c +0 -327
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-loader.c +0 -63
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-parser-test-suite.c +0 -196
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-parser.c +0 -88
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-scanner.c +0 -63
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/test-reader.c +0 -354
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/test-version.c +0 -29
- data/ext/apex_ext/apex_src/vendor/libyaml/yaml-0.1.pc.in +0 -10
- data/ext/apex_ext/apex_src/vendor/libyaml/yamlConfig.cmake.in +0 -16
- data/ext/apex_ext/apex_src/xcode_build/CMakeScripts/ReRunCMake.make +0 -74
- data/ext/apex_ext/apex_src/xcode_build/CTestTestfile.cmake +0 -22
- data/ext/apex_ext/apex_src/xcode_build/Debug/Apex.framework/Versions/A/Apex +0 -0
- data/ext/apex_ext/apex_src/xcode_build/Debug/Apex.framework/Versions/A/Resources/Info.plist +0 -44
- data/ext/apex_ext/apex_src/xcode_build/Debug/Apex.framework/Versions/A/_CodeSignature/CodeResources +0 -128
- data/ext/apex_ext/apex_src/xcode_build/apex.xcodeproj/project.pbxproj +0 -5118
- data/ext/apex_ext/apex_src/xcode_build/apex.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -8
- data/ext/apex_ext/apex_src/xcode_build/apex.xcodeproj/project.xcworkspace/xcuserdata/ttscoff.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/ext/apex_ext/apex_src/xcode_build/apex.xcodeproj/project.xcworkspace/xcuserdata/ttscoff.xcuserdatad/WorkspaceSettings.xcsettings +0 -8
- data/ext/apex_ext/apex_src/xcode_build/apex.xcodeproj/xcuserdata/ttscoff.xcuserdatad/xcschemes/xcschememanagement.plist +0 -99
- data/ext/apex_ext/apex_src/xcode_build/cmake_install.cmake +0 -452
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/CMakeScripts/ReRunCMake.make +0 -52
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/cmake_install.cmake +0 -55
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/cmark-gfm.xcodeproj/project.pbxproj +0 -2455
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/cmark-gfm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -8
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/extensions/cmake_install.cmake +0 -171
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/man/cmake_install.cmake +0 -55
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/src/cmake_install.cmake +0 -220
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/src/cmark-gfm_export.h +0 -43
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/src/cmark-gfm_version.h +0 -7
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/src/config.h +0 -76
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/src/libcmark-gfm.pc +0 -10
|
@@ -1,584 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NSString+Apex.m
|
|
3
|
-
* Implementation of Apex Markdown processor integration
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
#import "NSString+Apex.h"
|
|
7
|
-
#import <apex/apex.h>
|
|
8
|
-
|
|
9
|
-
#if __has_include(<AppKit/AppKit.h>)
|
|
10
|
-
#import <AppKit/AppKit.h>
|
|
11
|
-
#elif __has_include(<UIKit/UIKit.h>)
|
|
12
|
-
#import <UIKit/UIKit.h>
|
|
13
|
-
#endif
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Apex mode constants
|
|
17
|
-
*/
|
|
18
|
-
NSString *const ApexModeCommonmark = @"commonmark";
|
|
19
|
-
NSString *const ApexModeGFM = @"gfm";
|
|
20
|
-
NSString *const ApexModeMultiMarkdown = @"multimarkdown";
|
|
21
|
-
NSString *const ApexModeKramdown = @"kramdown";
|
|
22
|
-
NSString *const ApexModeUnified = @"unified";
|
|
23
|
-
NSString *const ApexModeQuarto = @"quarto";
|
|
24
|
-
|
|
25
|
-
@implementation NSString (Apex)
|
|
26
|
-
|
|
27
|
-
+ (apex_options)defaultApexOptions {
|
|
28
|
-
return apex_options_default();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
+ (NSString *)apexVersion {
|
|
32
|
-
const char *ver = apex_version_string();
|
|
33
|
-
return ver ? [NSString stringWithUTF8String:ver] : @"";
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Convert mode string to apex_mode_t enum
|
|
38
|
-
*/
|
|
39
|
-
+ (apex_mode_t)apexModeFromString:(NSString *)modeString {
|
|
40
|
-
NSString *mode = [modeString lowercaseString];
|
|
41
|
-
|
|
42
|
-
if ([mode isEqualToString:@"commonmark"]) {
|
|
43
|
-
return APEX_MODE_COMMONMARK;
|
|
44
|
-
} else if ([mode isEqualToString:@"gfm"]) {
|
|
45
|
-
return APEX_MODE_GFM;
|
|
46
|
-
} else if ([mode isEqualToString:@"multimarkdown"] ||
|
|
47
|
-
[mode isEqualToString:@"mmd"]) {
|
|
48
|
-
return APEX_MODE_MULTIMARKDOWN;
|
|
49
|
-
} else if ([mode isEqualToString:@"kramdown"]) {
|
|
50
|
-
return APEX_MODE_KRAMDOWN;
|
|
51
|
-
} else if ([mode isEqualToString:@"quarto"]) {
|
|
52
|
-
return APEX_MODE_QUARTO;
|
|
53
|
-
} else {
|
|
54
|
-
return APEX_MODE_UNIFIED; /* Default to unified */
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Convert Markdown to HTML using Apex (unified mode)
|
|
60
|
-
*/
|
|
61
|
-
+ (NSString *)convertWithApex:(NSString *)inputString {
|
|
62
|
-
return [self convertWithApex:inputString mode:ApexModeUnified];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Convert Markdown to HTML using Apex with specific mode
|
|
67
|
-
*/
|
|
68
|
-
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
69
|
-
mode:(NSString *)modeString {
|
|
70
|
-
if (!inputString || [inputString length] == 0) {
|
|
71
|
-
return @"";
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* Convert to C string */
|
|
75
|
-
const char *markdown = [inputString UTF8String];
|
|
76
|
-
if (!markdown) {
|
|
77
|
-
return @"";
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* Get options for the specified mode */
|
|
81
|
-
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
82
|
-
apex_options options = apex_options_for_mode(mode);
|
|
83
|
-
|
|
84
|
-
/* Convert to HTML */
|
|
85
|
-
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
86
|
-
|
|
87
|
-
if (!html_c) {
|
|
88
|
-
return @"";
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/* Convert back to NSString */
|
|
92
|
-
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
93
|
-
apex_free_string(html_c);
|
|
94
|
-
|
|
95
|
-
return html ? html : @"";
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Convert Markdown to HTML using Apex with standalone document options
|
|
100
|
-
*/
|
|
101
|
-
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
102
|
-
mode:(NSString *)modeString
|
|
103
|
-
standalone:(BOOL)standalone
|
|
104
|
-
stylesheet:(NSString *_Nullable)stylesheetPath
|
|
105
|
-
title:(NSString *_Nullable)title {
|
|
106
|
-
if (!inputString || [inputString length] == 0) {
|
|
107
|
-
return @"";
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/* Convert to C string */
|
|
111
|
-
const char *markdown = [inputString UTF8String];
|
|
112
|
-
if (!markdown) {
|
|
113
|
-
return @"";
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/* Get options for the specified mode */
|
|
117
|
-
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
118
|
-
apex_options options = apex_options_for_mode(mode);
|
|
119
|
-
|
|
120
|
-
/* Set standalone document options */
|
|
121
|
-
options.standalone = standalone;
|
|
122
|
-
if (stylesheetPath && [stylesheetPath length] > 0) {
|
|
123
|
-
const char *paths[2];
|
|
124
|
-
paths[0] = [stylesheetPath UTF8String];
|
|
125
|
-
paths[1] = NULL;
|
|
126
|
-
options.stylesheet_paths = paths;
|
|
127
|
-
options.stylesheet_count = 1;
|
|
128
|
-
}
|
|
129
|
-
if (title && [title length] > 0) {
|
|
130
|
-
options.document_title = [title UTF8String];
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/* Convert to HTML */
|
|
134
|
-
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
135
|
-
|
|
136
|
-
if (!html_c) {
|
|
137
|
-
return @"";
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/* Convert back to NSString */
|
|
141
|
-
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
142
|
-
apex_free_string(html_c);
|
|
143
|
-
|
|
144
|
-
return html ? html : @"";
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Convert Markdown to HTML using Apex with pretty printing option
|
|
149
|
-
*/
|
|
150
|
-
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
151
|
-
mode:(NSString *)modeString
|
|
152
|
-
pretty:(BOOL)pretty {
|
|
153
|
-
if (!inputString || [inputString length] == 0) {
|
|
154
|
-
return @"";
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/* Convert to C string */
|
|
158
|
-
const char *markdown = [inputString UTF8String];
|
|
159
|
-
if (!markdown) {
|
|
160
|
-
return @"";
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/* Get options for the specified mode */
|
|
164
|
-
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
165
|
-
apex_options options = apex_options_for_mode(mode);
|
|
166
|
-
|
|
167
|
-
/* Set pretty printing option */
|
|
168
|
-
options.pretty = pretty;
|
|
169
|
-
|
|
170
|
-
/* Convert to HTML */
|
|
171
|
-
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
172
|
-
|
|
173
|
-
if (!html_c) {
|
|
174
|
-
return @"";
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* Convert back to NSString */
|
|
178
|
-
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
179
|
-
apex_free_string(html_c);
|
|
180
|
-
|
|
181
|
-
return html ? html : @"";
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Convert Markdown to HTML using Apex with dictionary-based options
|
|
186
|
-
*/
|
|
187
|
-
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
188
|
-
mode:(NSString *)modeString
|
|
189
|
-
options:
|
|
190
|
-
(NSDictionary<NSString *, id> *_Nullable)optionsDict {
|
|
191
|
-
if (!inputString || [inputString length] == 0) {
|
|
192
|
-
return @"";
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/* Convert to C string */
|
|
196
|
-
const char *markdown = [inputString UTF8String];
|
|
197
|
-
if (!markdown) {
|
|
198
|
-
return @"";
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/* Get options for the specified mode */
|
|
202
|
-
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
203
|
-
apex_options options = apex_options_for_mode(mode);
|
|
204
|
-
|
|
205
|
-
/* Apply dictionary options if provided */
|
|
206
|
-
if (optionsDict) {
|
|
207
|
-
/* Pretty printing */
|
|
208
|
-
id prettyValue = optionsDict[@"pretty"];
|
|
209
|
-
if (prettyValue && [prettyValue isKindOfClass:[NSNumber class]]) {
|
|
210
|
-
options.pretty = [prettyValue boolValue];
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/* Standalone document */
|
|
214
|
-
id standaloneValue = optionsDict[@"standalone"];
|
|
215
|
-
if (standaloneValue && [standaloneValue isKindOfClass:[NSNumber class]]) {
|
|
216
|
-
options.standalone = [standaloneValue boolValue];
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/* Stylesheet path */
|
|
220
|
-
id stylesheetValue = optionsDict[@"stylesheet"];
|
|
221
|
-
if (stylesheetValue && [stylesheetValue isKindOfClass:[NSString class]]) {
|
|
222
|
-
NSString *stylesheet = (NSString *)stylesheetValue;
|
|
223
|
-
if ([stylesheet length] > 0) {
|
|
224
|
-
const char *paths[2];
|
|
225
|
-
paths[0] = [stylesheet UTF8String];
|
|
226
|
-
paths[1] = NULL;
|
|
227
|
-
options.stylesheet_paths = paths;
|
|
228
|
-
options.stylesheet_count = 1;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/* Document title */
|
|
233
|
-
id titleValue = optionsDict[@"title"];
|
|
234
|
-
if (titleValue && [titleValue isKindOfClass:[NSString class]]) {
|
|
235
|
-
NSString *title = (NSString *)titleValue;
|
|
236
|
-
if ([title length] > 0) {
|
|
237
|
-
options.document_title = [title UTF8String];
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/* Hard breaks */
|
|
242
|
-
id hardBreaksValue = optionsDict[@"hardBreaks"];
|
|
243
|
-
if (hardBreaksValue && [hardBreaksValue isKindOfClass:[NSNumber class]]) {
|
|
244
|
-
options.hardbreaks = [hardBreaksValue boolValue];
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/* Generate header IDs */
|
|
248
|
-
id generateHeaderIDsValue = optionsDict[@"generateHeaderIDs"];
|
|
249
|
-
if (generateHeaderIDsValue &&
|
|
250
|
-
[generateHeaderIDsValue isKindOfClass:[NSNumber class]]) {
|
|
251
|
-
options.generate_header_ids = [generateHeaderIDsValue boolValue];
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/* Unsafe HTML */
|
|
255
|
-
id unsafeValue = optionsDict[@"unsafe"];
|
|
256
|
-
if (unsafeValue && [unsafeValue isKindOfClass:[NSNumber class]]) {
|
|
257
|
-
options.unsafe = [unsafeValue boolValue];
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/* Header anchors */
|
|
261
|
-
id headerAnchorsValue = optionsDict[@"headerAnchors"];
|
|
262
|
-
if (headerAnchorsValue &&
|
|
263
|
-
[headerAnchorsValue isKindOfClass:[NSNumber class]]) {
|
|
264
|
-
options.header_anchors = [headerAnchorsValue boolValue];
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/* Obfuscate emails */
|
|
268
|
-
id obfuscateEmailsValue = optionsDict[@"obfuscateEmails"];
|
|
269
|
-
if (obfuscateEmailsValue &&
|
|
270
|
-
[obfuscateEmailsValue isKindOfClass:[NSNumber class]]) {
|
|
271
|
-
options.obfuscate_emails = [obfuscateEmailsValue boolValue];
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/* Embed images */
|
|
275
|
-
id embedImagesValue = optionsDict[@"embedImages"];
|
|
276
|
-
if (embedImagesValue && [embedImagesValue isKindOfClass:[NSNumber class]]) {
|
|
277
|
-
options.embed_images = [embedImagesValue boolValue];
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
/* Plugins */
|
|
281
|
-
id enablePluginsValue = optionsDict[@"enablePlugins"];
|
|
282
|
-
if (enablePluginsValue && [enablePluginsValue isKindOfClass:[NSNumber class]]) {
|
|
283
|
-
options.enable_plugins = [enablePluginsValue boolValue];
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/* Autolink bare URLs / emails */
|
|
287
|
-
id enableAutolinkValue = optionsDict[@"enableAutolink"];
|
|
288
|
-
if (enableAutolinkValue && [enableAutolinkValue isKindOfClass:[NSNumber class]]) {
|
|
289
|
-
options.enable_autolink = [enableAutolinkValue boolValue];
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/* Output format: html (default) or rtf */
|
|
293
|
-
id outputFormatValue = optionsDict[@"outputFormat"];
|
|
294
|
-
if (outputFormatValue && [outputFormatValue isKindOfClass:[NSString class]]) {
|
|
295
|
-
NSString *fmt = [(NSString *)outputFormatValue lowercaseString];
|
|
296
|
-
if ([fmt isEqualToString:@"rtf"]) {
|
|
297
|
-
options.output_format = APEX_OUTPUT_RTF;
|
|
298
|
-
} else {
|
|
299
|
-
options.output_format = APEX_OUTPUT_HTML;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/* Convert to HTML or RTF */
|
|
305
|
-
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
306
|
-
|
|
307
|
-
if (!html_c) {
|
|
308
|
-
return @"";
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/* Convert back to NSString */
|
|
312
|
-
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
313
|
-
apex_free_string(html_c);
|
|
314
|
-
|
|
315
|
-
return html ? html : @"";
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Convert Markdown to HTML using Apex with common options combined
|
|
320
|
-
*/
|
|
321
|
-
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
322
|
-
mode:(NSString *)modeString
|
|
323
|
-
generateHeaderIDs:(BOOL)generateHeaderIDs
|
|
324
|
-
hardBreaks:(BOOL)hardBreaks
|
|
325
|
-
pretty:(BOOL)pretty {
|
|
326
|
-
if (!inputString || [inputString length] == 0) {
|
|
327
|
-
return @"";
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/* Convert to C string */
|
|
331
|
-
const char *markdown = [inputString UTF8String];
|
|
332
|
-
if (!markdown) {
|
|
333
|
-
return @"";
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/* Get options for the specified mode */
|
|
337
|
-
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
338
|
-
apex_options options = apex_options_for_mode(mode);
|
|
339
|
-
|
|
340
|
-
/* Set common options */
|
|
341
|
-
options.generate_header_ids = generateHeaderIDs;
|
|
342
|
-
options.hardbreaks = hardBreaks;
|
|
343
|
-
options.pretty = pretty;
|
|
344
|
-
|
|
345
|
-
/* Convert to HTML */
|
|
346
|
-
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
347
|
-
|
|
348
|
-
if (!html_c) {
|
|
349
|
-
return @"";
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
/* Convert back to NSString */
|
|
353
|
-
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
354
|
-
apex_free_string(html_c);
|
|
355
|
-
|
|
356
|
-
return html ? html : @"";
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* Convert Markdown to HTML using Apex with source file URL for includes.
|
|
361
|
-
* Leaves local images as paths; sandboxed callers (e.g. Marked Quick Look)
|
|
362
|
-
* embed after security-scoped folder grants.
|
|
363
|
-
*/
|
|
364
|
-
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
365
|
-
mode:(NSString *)modeString
|
|
366
|
-
sourceURL:(NSURL *)sourceURL {
|
|
367
|
-
return [self convertWithApex:inputString
|
|
368
|
-
mode:modeString
|
|
369
|
-
sourceURL:sourceURL
|
|
370
|
-
enableAutolink:YES];
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
+ (NSString *)convertWithApex:(NSString *)inputString
|
|
374
|
-
mode:(NSString *)modeString
|
|
375
|
-
sourceURL:(NSURL *)sourceURL
|
|
376
|
-
enableAutolink:(BOOL)enableAutolink {
|
|
377
|
-
if (!inputString || [inputString length] == 0) {
|
|
378
|
-
return @"";
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
const char *markdown = [inputString UTF8String];
|
|
382
|
-
if (!markdown) {
|
|
383
|
-
return @"";
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
apex_mode_t mode = [self apexModeFromString:modeString];
|
|
387
|
-
apex_options options = apex_options_for_mode(mode);
|
|
388
|
-
|
|
389
|
-
options.unsafe = true;
|
|
390
|
-
options.generate_header_ids = true;
|
|
391
|
-
options.enable_critic_markup = true;
|
|
392
|
-
options.critic_mode = 2; /* CRITIC_MARKUP: show markup with classes */
|
|
393
|
-
/* Do not embed images here: fopen/stat under Dropbox/CloudStorage can stall
|
|
394
|
-
* sandboxed Quick Look. Callers (Marked Quick Look) embed after security-scoped
|
|
395
|
-
* folder grants with a non-blocking Swift pass. */
|
|
396
|
-
options.embed_images = false;
|
|
397
|
-
options.enable_autolink = enableAutolink;
|
|
398
|
-
|
|
399
|
-
if (sourceURL && sourceURL.isFileURL) {
|
|
400
|
-
NSString *path = sourceURL.path;
|
|
401
|
-
if (path.length > 0) {
|
|
402
|
-
options.input_file_path = [path UTF8String];
|
|
403
|
-
NSString *baseDir = [path stringByDeletingLastPathComponent];
|
|
404
|
-
if (baseDir.length > 0) {
|
|
405
|
-
options.base_directory = [baseDir UTF8String];
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
char *html_c = apex_markdown_to_html(markdown, strlen(markdown), &options);
|
|
411
|
-
|
|
412
|
-
if (!html_c) {
|
|
413
|
-
return @"";
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
NSString *html = [NSString stringWithUTF8String:html_c];
|
|
417
|
-
apex_free_string(html_c);
|
|
418
|
-
|
|
419
|
-
return html ? html : @"";
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* Convert this string (as Markdown) to HTML using Apex in unified mode
|
|
424
|
-
*/
|
|
425
|
-
- (NSString *)apexHTML {
|
|
426
|
-
return [NSString convertWithApex:self];
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Convert this string (as Markdown) to HTML using Apex with specific mode
|
|
431
|
-
*/
|
|
432
|
-
- (NSString *)apexHTMLWithMode:(NSString *)mode {
|
|
433
|
-
return [NSString convertWithApex:self mode:mode];
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
- (NSString *)apexRTF {
|
|
437
|
-
return [self apexRTFWithMode:ApexModeUnified options:nil];
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
- (NSString *)apexRTFWithMode:(NSString *)mode {
|
|
441
|
-
return [self apexRTFWithMode:mode options:nil];
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
- (NSString *)apexRTFWithMode:(NSString *)mode
|
|
445
|
-
options:(NSDictionary<NSString *, id> *_Nullable)options {
|
|
446
|
-
NSMutableDictionary *dict =
|
|
447
|
-
options ? [options mutableCopy] : [NSMutableDictionary dictionary];
|
|
448
|
-
dict[@"outputFormat"] = @"rtf";
|
|
449
|
-
return [NSString convertWithApex:self mode:mode options:dict];
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
#if __has_include(<AppKit/AppKit.h>) || __has_include(<UIKit/UIKit.h>)
|
|
453
|
-
- (NSAttributedString *)apexAttributedString {
|
|
454
|
-
return [self apexAttributedStringWithMode:ApexModeUnified options:nil usingHTML:NO];
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
- (NSAttributedString *)apexAttributedStringUsingHTML:(BOOL)useHTML {
|
|
458
|
-
return [self apexAttributedStringWithMode:ApexModeUnified options:nil usingHTML:useHTML];
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
- (NSAttributedString *)apexAttributedStringWithMode:(NSString *)mode
|
|
462
|
-
options:(NSDictionary<NSString *, id> *_Nullable)options
|
|
463
|
-
usingHTML:(BOOL)useHTML {
|
|
464
|
-
NSString *source = nil;
|
|
465
|
-
NSAttributedStringDocumentType docType;
|
|
466
|
-
if (useHTML) {
|
|
467
|
-
source = [NSString convertWithApex:self mode:mode options:options];
|
|
468
|
-
docType = NSHTMLTextDocumentType;
|
|
469
|
-
} else {
|
|
470
|
-
source = [self apexRTFWithMode:mode options:options];
|
|
471
|
-
docType = NSRTFTextDocumentType;
|
|
472
|
-
}
|
|
473
|
-
if (!source || [source length] == 0) {
|
|
474
|
-
return [[NSAttributedString alloc] initWithString:@""];
|
|
475
|
-
}
|
|
476
|
-
NSData *data = [source dataUsingEncoding:NSUTF8StringEncoding];
|
|
477
|
-
if (!data) {
|
|
478
|
-
return nil;
|
|
479
|
-
}
|
|
480
|
-
NSDictionary *attrs = @{
|
|
481
|
-
NSDocumentTypeDocumentAttribute : docType,
|
|
482
|
-
NSCharacterEncodingDocumentAttribute : @(NSUTF8StringEncoding)
|
|
483
|
-
};
|
|
484
|
-
NSError *error = nil;
|
|
485
|
-
NSAttributedString *attr =
|
|
486
|
-
[[NSAttributedString alloc] initWithData:data options:attrs documentAttributes:nil error:&error];
|
|
487
|
-
(void)error;
|
|
488
|
-
return attr;
|
|
489
|
-
}
|
|
490
|
-
#endif
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Extract a flat table of contents as dictionaries suitable for Swift OutlineGroup.
|
|
494
|
-
* Each entry: @{ @"level": NSNumber, @"text": NSString, @"id": NSString }
|
|
495
|
-
* Optional options keys: @"idFormat" (@"gfm"/@"mmd"/@"kramdown"),
|
|
496
|
-
* @"tocMinMax" (@"2,4" or @[@2, @4]).
|
|
497
|
-
*/
|
|
498
|
-
+ (NSArray<NSDictionary<NSString *, id> *> *)tableOfContentsWithApex:(NSString *)inputString
|
|
499
|
-
mode:(NSString *)modeString
|
|
500
|
-
options:(NSDictionary<NSString *, id> *_Nullable)optionsDict {
|
|
501
|
-
if (!inputString || [inputString length] == 0) {
|
|
502
|
-
return @[];
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
const char *markdown = [inputString UTF8String];
|
|
506
|
-
if (!markdown) {
|
|
507
|
-
return @[];
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
apex_mode_t mode = [self apexModeFromString:modeString ?: ApexModeUnified];
|
|
511
|
-
apex_options options = apex_options_for_mode(mode);
|
|
512
|
-
|
|
513
|
-
if (optionsDict) {
|
|
514
|
-
id idFormatVal = optionsDict[@"idFormat"];
|
|
515
|
-
if ([idFormatVal isKindOfClass:[NSString class]]) {
|
|
516
|
-
NSString *fmt = [(NSString *)idFormatVal lowercaseString];
|
|
517
|
-
if ([fmt isEqualToString:@"mmd"]) {
|
|
518
|
-
options.id_format = 1;
|
|
519
|
-
} else if ([fmt isEqualToString:@"kramdown"]) {
|
|
520
|
-
options.id_format = 2;
|
|
521
|
-
} else {
|
|
522
|
-
options.id_format = 0;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
id tocMinMaxVal = optionsDict[@"tocMinMax"];
|
|
526
|
-
if ([tocMinMaxVal isKindOfClass:[NSString class]]) {
|
|
527
|
-
int min = 0, max = 0;
|
|
528
|
-
if (sscanf([(NSString *)tocMinMaxVal UTF8String], "%d,%d", &min, &max) == 2 &&
|
|
529
|
-
min >= 1 && max <= 6 && min <= max) {
|
|
530
|
-
options.toc_min = min;
|
|
531
|
-
options.toc_max = max;
|
|
532
|
-
}
|
|
533
|
-
} else if ([tocMinMaxVal isKindOfClass:[NSArray class]] &&
|
|
534
|
-
[(NSArray *)tocMinMaxVal count] >= 2) {
|
|
535
|
-
int min = [[(NSArray *)tocMinMaxVal objectAtIndex:0] intValue];
|
|
536
|
-
int max = [[(NSArray *)tocMinMaxVal objectAtIndex:1] intValue];
|
|
537
|
-
if (min >= 1 && max <= 6 && min <= max) {
|
|
538
|
-
options.toc_min = min;
|
|
539
|
-
options.toc_max = max;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
size_t count = 0;
|
|
545
|
-
apex_toc_entry *entries =
|
|
546
|
-
apex_markdown_to_toc_entries(markdown, strlen(markdown), &options, &count);
|
|
547
|
-
if (!entries || count == 0) {
|
|
548
|
-
apex_toc_entries_free(entries, count);
|
|
549
|
-
return @[];
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
NSMutableArray<NSDictionary<NSString *, id> *> *result =
|
|
553
|
-
[NSMutableArray arrayWithCapacity:count];
|
|
554
|
-
for (size_t i = 0; i < count; i++) {
|
|
555
|
-
NSString *text = entries[i].text
|
|
556
|
-
? [NSString stringWithUTF8String:entries[i].text]
|
|
557
|
-
: @"";
|
|
558
|
-
NSString *ident = entries[i].id
|
|
559
|
-
? [NSString stringWithUTF8String:entries[i].id]
|
|
560
|
-
: @"";
|
|
561
|
-
[result addObject:@{
|
|
562
|
-
@"level" : @(entries[i].level),
|
|
563
|
-
@"text" : text ?: @"",
|
|
564
|
-
@"id" : ident ?: @""
|
|
565
|
-
}];
|
|
566
|
-
}
|
|
567
|
-
apex_toc_entries_free(entries, count);
|
|
568
|
-
return result;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
+ (NSArray<NSDictionary<NSString *, id> *> *)tableOfContentsWithApex:(NSString *)inputString {
|
|
572
|
-
return [self tableOfContentsWithApex:inputString mode:ApexModeUnified options:nil];
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
- (NSArray<NSDictionary<NSString *, id> *> *)apexTableOfContents {
|
|
576
|
-
return [NSString tableOfContentsWithApex:self];
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
- (NSArray<NSDictionary<NSString *, id> *> *)apexTableOfContentsWithMode:(NSString *)mode
|
|
580
|
-
options:(NSDictionary<NSString *, id> *_Nullable)options {
|
|
581
|
-
return [NSString tableOfContentsWithApex:self mode:mode options:options];
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
@end
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NSString+ApexPlugins.h
|
|
3
|
-
* Objective-C API for Apex plugin catalog and installation.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
#import <Foundation/Foundation.h>
|
|
7
|
-
|
|
8
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
9
|
-
|
|
10
|
-
/** Metadata for one plugin (catalog or installed). */
|
|
11
|
-
@interface ApexPluginInfo : NSObject
|
|
12
|
-
|
|
13
|
-
@property (nonatomic, copy, readonly) NSString *pluginId;
|
|
14
|
-
@property (nonatomic, copy, readonly, nullable) NSString *title;
|
|
15
|
-
@property (nonatomic, copy, readonly, nullable) NSString *pluginDescription;
|
|
16
|
-
@property (nonatomic, copy, readonly, nullable) NSString *author;
|
|
17
|
-
@property (nonatomic, copy, readonly, nullable) NSString *homepage;
|
|
18
|
-
@property (nonatomic, copy, readonly, nullable) NSString *repo;
|
|
19
|
-
|
|
20
|
-
- (instancetype)init NS_UNAVAILABLE;
|
|
21
|
-
|
|
22
|
-
@end
|
|
23
|
-
|
|
24
|
-
/** Plugin catalog and install helpers for app UIs. */
|
|
25
|
-
@interface ApexPluginCatalog : NSObject
|
|
26
|
-
|
|
27
|
-
/** Default apex-plugins.json URL. */
|
|
28
|
-
@property (class, nonatomic, readonly) NSString *defaultDirectoryURL;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Fetch available plugins from the central directory.
|
|
32
|
-
* @param error Set on failure (network, parse, curl missing).
|
|
33
|
-
*/
|
|
34
|
-
+ (nullable NSArray<ApexPluginInfo *> *)fetchAvailablePlugins:(NSError **)error;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Fetch available plugins from a custom directory JSON URL.
|
|
38
|
-
*/
|
|
39
|
-
+ (nullable NSArray<ApexPluginInfo *> *)fetchAvailablePluginsFromURL:(NSString *)url
|
|
40
|
-
error:(NSError **)error;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* List installed plugins (project + user-global, same order as runtime loading).
|
|
44
|
-
* @param baseDirectory Optional document base for .apex/plugins lookup.
|
|
45
|
-
*/
|
|
46
|
-
+ (NSArray<ApexPluginInfo *> *)installedPluginsWithBaseDirectory:(NSString * _Nullable)baseDirectory;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Install a plugin by directory id into ~/.config/apex/plugins.
|
|
50
|
-
*/
|
|
51
|
-
+ (BOOL)installPluginWithId:(NSString *)pluginId error:(NSError **)error;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Install from a Git URL or GitHub shorthand (user/repo). Requires explicit opt-in.
|
|
55
|
-
*/
|
|
56
|
-
+ (BOOL)installPluginFromRepository:(NSString *)idOrRepo
|
|
57
|
-
allowUntrustedSource:(BOOL)allowUntrusted
|
|
58
|
-
error:(NSError **)error;
|
|
59
|
-
|
|
60
|
-
/** Remove a plugin from the user-global plugins directory. */
|
|
61
|
-
+ (BOOL)uninstallPluginWithId:(NSString *)pluginId error:(NSError **)error;
|
|
62
|
-
|
|
63
|
-
/** User-global plugins directory path. */
|
|
64
|
-
+ (nullable NSString *)globalPluginsDirectory;
|
|
65
|
-
|
|
66
|
-
@end
|
|
67
|
-
|
|
68
|
-
FOUNDATION_EXPORT NSErrorDomain const ApexPluginErrorDomain;
|
|
69
|
-
|
|
70
|
-
typedef NS_ERROR_ENUM(ApexPluginErrorDomain, ApexPluginError) {
|
|
71
|
-
ApexPluginErrorFetchFailed = 1,
|
|
72
|
-
ApexPluginErrorInstallFailed = 2,
|
|
73
|
-
ApexPluginErrorUninstallFailed = 3,
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
NS_ASSUME_NONNULL_END
|