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
|
@@ -1198,9 +1198,9 @@ char *apex_inject_table_attributes(const char *html, cmark_node *document, int c
|
|
|
1198
1198
|
/* Check if this row should be in tfoot.
|
|
1199
1199
|
* tfoot_rows are stored with AST row indices, so we need to check ast_row_idx.
|
|
1200
1200
|
*
|
|
1201
|
-
*
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1201
|
+
* A row is in tfoot only when the AST marked it and it comes AFTER the ===
|
|
1202
|
+
* marker row. Do not use HTML-position fudge factors — those incorrectly
|
|
1203
|
+
* forced the first footer row into tbody for normal GFM tables. */
|
|
1204
1204
|
current_row_is_tfoot = false;
|
|
1205
1205
|
|
|
1206
1206
|
/* First, find the === row's AST index */
|
|
@@ -1215,8 +1215,29 @@ char *apex_inject_table_attributes(const char *html, cmark_node *document, int c
|
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
1217
|
if (eq_total > 0 && eq_total == eq_removed) {
|
|
1218
|
-
|
|
1219
|
-
|
|
1218
|
+
/* Prefer rows that look like === markers when attrs are available */
|
|
1219
|
+
bool looks_like_equals = false;
|
|
1220
|
+
if (attrs) {
|
|
1221
|
+
for (cell_attr *a = attrs; a; a = a->next) {
|
|
1222
|
+
if (a->table_index != table_idx || a->row_index != r || !a->cell_text)
|
|
1223
|
+
continue;
|
|
1224
|
+
const char *text = a->cell_text;
|
|
1225
|
+
while (*text && isspace((unsigned char)*text)) text++;
|
|
1226
|
+
if (text[0] == '=' && text[1] == '=' && text[2] == '=') {
|
|
1227
|
+
looks_like_equals = true;
|
|
1228
|
+
break;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
if (looks_like_equals || !attrs) {
|
|
1233
|
+
min_equals_row_idx = r;
|
|
1234
|
+
break;
|
|
1235
|
+
}
|
|
1236
|
+
/* Fully-removed non-equals row (e.g. em-dash helper): keep looking */
|
|
1237
|
+
if (min_equals_row_idx < 0) {
|
|
1238
|
+
/* fall through and continue search for a real === row */
|
|
1239
|
+
}
|
|
1240
|
+
continue;
|
|
1220
1241
|
}
|
|
1221
1242
|
}
|
|
1222
1243
|
|
|
@@ -1229,113 +1250,13 @@ char *apex_inject_table_attributes(const char *html, cmark_node *document, int c
|
|
|
1229
1250
|
}
|
|
1230
1251
|
}
|
|
1231
1252
|
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
if (min_equals_row_idx >= 0) {
|
|
1237
|
-
/* Calculate how many HTML rows appear before the === row */
|
|
1238
|
-
int html_rows_before_equals = -1; /* Start at -1, will be 0 for header */
|
|
1239
|
-
for (int r = 0; r < 100 && r <= min_equals_row_idx; r++) {
|
|
1240
|
-
bool has_non_removed = false;
|
|
1241
|
-
for (all_cell *c = all_cells; c; c = c->next) {
|
|
1242
|
-
if (c->table_index == table_idx &&
|
|
1243
|
-
c->row_index == r &&
|
|
1244
|
-
!c->is_removed) {
|
|
1245
|
-
has_non_removed = true;
|
|
1246
|
-
break;
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
if (has_non_removed) {
|
|
1250
|
-
html_rows_before_equals++;
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
/* If this row's HTML position is before the === row, force it to tbody.
|
|
1255
|
-
* Since the === row is skipped, rows with row_idx <= html_rows_before_equals + 1
|
|
1256
|
-
* appear before the === row in HTML.
|
|
1257
|
-
*
|
|
1258
|
-
* CRITICAL: We must set current_row_is_tfoot = false BEFORE the skip check,
|
|
1259
|
-
* so that rows forced to tbody are not skipped. */
|
|
1260
|
-
if (html_rows_before_equals >= 0 && row_idx <= html_rows_before_equals + 1) {
|
|
1261
|
-
current_row_is_tfoot = false;
|
|
1262
|
-
} else if (ast_row_idx >= 0 && ast_row_idx <= min_equals_row_idx) {
|
|
1263
|
-
/* Also check AST position as a fallback */
|
|
1264
|
-
current_row_is_tfoot = false;
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
/* If marked as tfoot, verify it actually comes after === in HTML */
|
|
1269
|
-
if (is_marked_tfoot && min_equals_row_idx >= 0) {
|
|
1270
|
-
/* Calculate how many HTML rows appear before the === row.
|
|
1271
|
-
* Count non-removed AST rows up to min_equals_row_idx.
|
|
1272
|
-
* This gives us the HTML row index of the last row that appears BEFORE the === row. */
|
|
1273
|
-
int html_rows_before_equals = -1; /* Start at -1, will be 0 for header */
|
|
1274
|
-
for (int r = 0; r < 100 && r <= min_equals_row_idx; r++) {
|
|
1275
|
-
bool has_non_removed = false;
|
|
1276
|
-
for (all_cell *c = all_cells; c; c = c->next) {
|
|
1277
|
-
if (c->table_index == table_idx &&
|
|
1278
|
-
c->row_index == r &&
|
|
1279
|
-
!c->is_removed) {
|
|
1280
|
-
has_non_removed = true;
|
|
1281
|
-
break;
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
if (has_non_removed) {
|
|
1285
|
-
html_rows_before_equals++;
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
/* CRITICAL: The issue is that rows with AST index > min_equals_row_idx can still
|
|
1290
|
-
* appear in HTML before the === row (since === is skipped). So we need to check
|
|
1291
|
-
* if this row's HTML position (row_idx) is <= html_rows_before_equals.
|
|
1292
|
-
*
|
|
1293
|
-
* The key insight: html_rows_before_equals is the HTML row index of the last row
|
|
1294
|
-
* that appears BEFORE the === row. So if row_idx <= html_rows_before_equals,
|
|
1295
|
-
* this row appears before === in HTML, so it must be in tbody.
|
|
1296
|
-
*
|
|
1297
|
-
* But we also need to check AST position as a fallback, because the HTML position
|
|
1298
|
-
* calculation might be off if the row mapping is wrong. */
|
|
1299
|
-
bool force_to_tbody = false;
|
|
1300
|
-
|
|
1301
|
-
/* First check: AST position */
|
|
1302
|
-
if (ast_row_idx <= min_equals_row_idx) {
|
|
1303
|
-
/* AST says it's before or at ===, so it must be in tbody */
|
|
1304
|
-
force_to_tbody = true;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
/* Second check: HTML position
|
|
1308
|
-
* Since the === row is skipped in HTML, rows with row_idx <= html_rows_before_equals + 2
|
|
1309
|
-
* appear before the === row in HTML. The +2 accounts for:
|
|
1310
|
-
* - html_rows_before_equals is the count of rows before === (including header)
|
|
1311
|
-
* - row_idx is 1-based (1=header, 2=first data, 3=second data, 4===, 5=footer)
|
|
1312
|
-
* - So row_idx <= html_rows_before_equals + 2 covers the first two data rows. */
|
|
1313
|
-
if (html_rows_before_equals >= 0 && row_idx <= html_rows_before_equals + 2) {
|
|
1314
|
-
/* HTML position says it's before ===, so it must be in tbody */
|
|
1315
|
-
force_to_tbody = true;
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
/* Third check: If row_idx <= 3, it's definitely in tbody (header + first two data rows) */
|
|
1319
|
-
if (row_idx <= 3) {
|
|
1320
|
-
force_to_tbody = true;
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
if (force_to_tbody) {
|
|
1324
|
-
current_row_is_tfoot = false;
|
|
1253
|
+
if (is_marked_tfoot) {
|
|
1254
|
+
if (min_equals_row_idx >= 0) {
|
|
1255
|
+
/* Footer content is strictly after the === marker row */
|
|
1256
|
+
current_row_is_tfoot = (ast_row_idx > min_equals_row_idx);
|
|
1325
1257
|
} else {
|
|
1326
|
-
/*
|
|
1327
|
-
current_row_is_tfoot =
|
|
1328
|
-
}
|
|
1329
|
-
} else if (is_marked_tfoot) {
|
|
1330
|
-
/* No === row found, but row is marked as tfoot - use AST marking */
|
|
1331
|
-
/* BUT: Even if no === row is found, if this row's HTML position suggests
|
|
1332
|
-
* it should be in tbody (e.g., it's one of the first few rows), don't mark as tfoot.
|
|
1333
|
-
* This handles edge cases where the === row might not be detected correctly. */
|
|
1334
|
-
if (row_idx <= 2) {
|
|
1335
|
-
/* If this is one of the first few rows, it's probably in tbody */
|
|
1336
|
-
current_row_is_tfoot = false;
|
|
1337
|
-
} else {
|
|
1338
|
-
current_row_is_tfoot = true;
|
|
1258
|
+
/* === row not found as fully-removed; trust AST except header */
|
|
1259
|
+
current_row_is_tfoot = (ast_row_idx > 0);
|
|
1339
1260
|
}
|
|
1340
1261
|
}
|
|
1341
1262
|
|
|
@@ -1420,25 +1341,13 @@ char *apex_inject_table_attributes(const char *html, cmark_node *document, int c
|
|
|
1420
1341
|
}
|
|
1421
1342
|
}
|
|
1422
1343
|
|
|
1423
|
-
/*
|
|
1424
|
-
*
|
|
1425
|
-
*
|
|
1426
|
-
* Note: row_idx is incremented before this check (line 894), so:
|
|
1427
|
-
* - row_idx 1 = header
|
|
1428
|
-
* - row_idx 2 = first data row
|
|
1429
|
-
* - row_idx 3 = second data row (this is the one we were missing!)
|
|
1430
|
-
* - row_idx 4 = === row (should be skipped)
|
|
1431
|
-
* - row_idx 5 = footer
|
|
1432
|
-
*
|
|
1433
|
-
* This check must run FIRST, before any other skip logic, to ensure these rows
|
|
1434
|
-
* are always rendered. */
|
|
1344
|
+
/* Keep early data rows from being skipped by removal heuristics.
|
|
1345
|
+
* Do not override tfoot classification here — a short table can have
|
|
1346
|
+
* its footer at a low HTML row index once the === marker is omitted. */
|
|
1435
1347
|
bool force_keep_row = false;
|
|
1436
|
-
if (!row_fully_removed && row_idx <= 3) {
|
|
1437
|
-
/* First few rows (header + first two data rows) are always in tbody - never skip them */
|
|
1348
|
+
if (!row_fully_removed && row_idx <= 3 && !current_row_is_tfoot) {
|
|
1438
1349
|
force_keep_row = true;
|
|
1439
1350
|
should_skip_row = false;
|
|
1440
|
-
/* Always set current_row_is_tfoot = false for these rows - they're definitely in tbody */
|
|
1441
|
-
current_row_is_tfoot = false;
|
|
1442
1351
|
}
|
|
1443
1352
|
|
|
1444
1353
|
/* CRITICAL: Only check if row should be skipped if we haven't already determined
|
|
@@ -1291,10 +1291,14 @@ char *apex_inject_header_ids(const char *html, cmark_node *document, bool genera
|
|
|
1291
1291
|
}
|
|
1292
1292
|
header_map = reversed;
|
|
1293
1293
|
|
|
1294
|
-
/* Process HTML to inject IDs
|
|
1294
|
+
/* Process HTML to inject IDs / optional permalink anchors.
|
|
1295
|
+
* Anchor tags are much larger than id="" attributes; under-estimating
|
|
1296
|
+
* capacity used to silently drop the HTML tail (For_Brett: lost items
|
|
1297
|
+
* 144–145 when header_anchors was on and the Annotations pad was stripped). */
|
|
1295
1298
|
size_t html_len = strlen(html);
|
|
1296
|
-
size_t
|
|
1297
|
-
|
|
1299
|
+
size_t per_header = use_anchors ? 220 : 100;
|
|
1300
|
+
size_t capacity = html_len + header_count * per_header + 64;
|
|
1301
|
+
char *output = malloc(capacity);
|
|
1298
1302
|
if (!output) {
|
|
1299
1303
|
/* Clean up */
|
|
1300
1304
|
while (header_map) {
|
|
@@ -1309,7 +1313,27 @@ char *apex_inject_header_ids(const char *html, cmark_node *document, bool genera
|
|
|
1309
1313
|
|
|
1310
1314
|
const char *read = html;
|
|
1311
1315
|
char *write = output;
|
|
1312
|
-
size_t remaining = capacity;
|
|
1316
|
+
size_t remaining = capacity;
|
|
1317
|
+
|
|
1318
|
+
#define APEX_HEADER_ID_ENSURE(needed) do { \
|
|
1319
|
+
size_t _need = (size_t)(needed); \
|
|
1320
|
+
if (remaining < _need + 1) { \
|
|
1321
|
+
size_t _used = (size_t)(write - output); \
|
|
1322
|
+
size_t _new_cap = (_used + _need + 1) * 2; \
|
|
1323
|
+
if (_new_cap < _used + _need + 64) { \
|
|
1324
|
+
_new_cap = _used + _need + 64; \
|
|
1325
|
+
} \
|
|
1326
|
+
char *_new_out = realloc(output, _new_cap); \
|
|
1327
|
+
if (!_new_out) { \
|
|
1328
|
+
*write = '\0'; \
|
|
1329
|
+
goto apex_inject_header_ids_done; \
|
|
1330
|
+
} \
|
|
1331
|
+
output = _new_out; \
|
|
1332
|
+
write = output + _used; \
|
|
1333
|
+
remaining = _new_cap - _used; \
|
|
1334
|
+
capacity = _new_cap; \
|
|
1335
|
+
} \
|
|
1336
|
+
} while (0)
|
|
1313
1337
|
|
|
1314
1338
|
while (*read) {
|
|
1315
1339
|
/* Look for header opening tags: <h1>, <h2>, etc. */
|
|
@@ -1323,12 +1347,9 @@ char *apex_inject_header_ids(const char *html, cmark_node *document, bool genera
|
|
|
1323
1347
|
while (*tag_end && *tag_end != '>') tag_end++;
|
|
1324
1348
|
if (*tag_end != '>') {
|
|
1325
1349
|
/* Malformed tag, just copy */
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
} else {
|
|
1330
|
-
read++;
|
|
1331
|
-
}
|
|
1350
|
+
APEX_HEADER_ID_ENSURE(1);
|
|
1351
|
+
*write++ = *read++;
|
|
1352
|
+
remaining--;
|
|
1332
1353
|
continue;
|
|
1333
1354
|
}
|
|
1334
1355
|
|
|
@@ -1404,11 +1425,10 @@ char *apex_inject_header_ids(const char *html, cmark_node *document, bool genera
|
|
|
1404
1425
|
if (use_anchors && header && header->id) {
|
|
1405
1426
|
/* For anchor tags: copy the entire header tag, then inject anchor after '>' */
|
|
1406
1427
|
size_t tag_len = tag_end - tag_start + 1; /* Include '>' */
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
}
|
|
1428
|
+
APEX_HEADER_ID_ENSURE(tag_len);
|
|
1429
|
+
memcpy(write, tag_start, tag_len);
|
|
1430
|
+
write += tag_len;
|
|
1431
|
+
remaining -= tag_len;
|
|
1412
1432
|
read = tag_end + 1;
|
|
1413
1433
|
|
|
1414
1434
|
/* Inject anchor tag after the header tag */
|
|
@@ -1417,21 +1437,19 @@ char *apex_inject_header_ids(const char *html, cmark_node *document, bool genera
|
|
|
1417
1437
|
"<a href=\"#%s\" aria-hidden=\"true\" class=\"anchor\" id=\"%s\"></a>",
|
|
1418
1438
|
header->id, header->id);
|
|
1419
1439
|
size_t anchor_len = strlen(anchor_tag);
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
}
|
|
1440
|
+
APEX_HEADER_ID_ENSURE(anchor_len);
|
|
1441
|
+
memcpy(write, anchor_tag, anchor_len);
|
|
1442
|
+
write += anchor_len;
|
|
1443
|
+
remaining -= anchor_len;
|
|
1425
1444
|
} else if (!use_anchors && header && header->id) {
|
|
1426
1445
|
/* For header IDs: replace existing ID or inject new one */
|
|
1427
1446
|
if (has_id && id_attr) {
|
|
1428
1447
|
/* Replace existing ID: copy up to id=, skip old ID value, inject new ID, copy rest */
|
|
1429
1448
|
size_t before_id_len = id_attr - tag_start;
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
}
|
|
1449
|
+
APEX_HEADER_ID_ENSURE(before_id_len);
|
|
1450
|
+
memcpy(write, tag_start, before_id_len);
|
|
1451
|
+
write += before_id_len;
|
|
1452
|
+
remaining -= before_id_len;
|
|
1435
1453
|
|
|
1436
1454
|
/* Find the end of the old ID attribute value */
|
|
1437
1455
|
const char *old_id_end = id_attr + 3; /* After 'id=' */
|
|
@@ -1452,33 +1470,26 @@ char *apex_inject_header_ids(const char *html, cmark_node *document, bool genera
|
|
|
1452
1470
|
char id_attr_str[512];
|
|
1453
1471
|
snprintf(id_attr_str, sizeof(id_attr_str), "id=\"%s\"", header->id);
|
|
1454
1472
|
size_t id_len = strlen(id_attr_str);
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
}
|
|
1473
|
+
APEX_HEADER_ID_ENSURE(id_len);
|
|
1474
|
+
memcpy(write, id_attr_str, id_len);
|
|
1475
|
+
write += id_len;
|
|
1476
|
+
remaining -= id_len;
|
|
1460
1477
|
|
|
1461
1478
|
/* Copy rest of tag from after old ID until '>' */
|
|
1462
1479
|
read = old_id_end;
|
|
1463
1480
|
while (read < tag_end && *read != '>') {
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
} else {
|
|
1468
|
-
read++;
|
|
1469
|
-
}
|
|
1481
|
+
APEX_HEADER_ID_ENSURE(1);
|
|
1482
|
+
*write++ = *read++;
|
|
1483
|
+
remaining--;
|
|
1470
1484
|
}
|
|
1471
1485
|
|
|
1472
1486
|
/* Copy closing '>' */
|
|
1473
1487
|
if (read < tag_end && *read == '>') {
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
} else {
|
|
1478
|
-
read++;
|
|
1488
|
+
APEX_HEADER_ID_ENSURE(1);
|
|
1489
|
+
*write++ = *read++;
|
|
1490
|
+
remaining--;
|
|
1479
1491
|
}
|
|
1480
|
-
}
|
|
1481
|
-
} else {
|
|
1492
|
+
} else {
|
|
1482
1493
|
/* No existing ID: copy tag up to '>', inject id attribute, then copy '>' */
|
|
1483
1494
|
const char *after_tag_name = tag_start + 3;
|
|
1484
1495
|
while (*after_tag_name && *after_tag_name != '>' && !isspace((unsigned char)*after_tag_name)) {
|
|
@@ -1487,11 +1498,10 @@ char *apex_inject_header_ids(const char *html, cmark_node *document, bool genera
|
|
|
1487
1498
|
|
|
1488
1499
|
/* Copy '<hN' */
|
|
1489
1500
|
size_t tag_prefix_len = after_tag_name - tag_start;
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
}
|
|
1501
|
+
APEX_HEADER_ID_ENSURE(tag_prefix_len);
|
|
1502
|
+
memcpy(write, tag_start, tag_prefix_len);
|
|
1503
|
+
write += tag_prefix_len;
|
|
1504
|
+
remaining -= tag_prefix_len;
|
|
1495
1505
|
read = after_tag_name;
|
|
1496
1506
|
|
|
1497
1507
|
/* Copy any existing attributes before injecting id */
|
|
@@ -1503,15 +1513,15 @@ char *apex_inject_header_ids(const char *html, cmark_node *document, bool genera
|
|
|
1503
1513
|
/* If there are existing attributes, copy them */
|
|
1504
1514
|
if (read > attr_start) {
|
|
1505
1515
|
size_t attr_len = read - attr_start;
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
}
|
|
1516
|
+
APEX_HEADER_ID_ENSURE(attr_len);
|
|
1517
|
+
memcpy(write, attr_start, attr_len);
|
|
1518
|
+
write += attr_len;
|
|
1519
|
+
remaining -= attr_len;
|
|
1511
1520
|
}
|
|
1512
1521
|
|
|
1513
1522
|
/* Add space before id attribute if needed */
|
|
1514
|
-
if (
|
|
1523
|
+
if (read > attr_start || *read == '>') {
|
|
1524
|
+
APEX_HEADER_ID_ENSURE(1);
|
|
1515
1525
|
*write++ = ' ';
|
|
1516
1526
|
remaining--;
|
|
1517
1527
|
}
|
|
@@ -1520,56 +1530,41 @@ char *apex_inject_header_ids(const char *html, cmark_node *document, bool genera
|
|
|
1520
1530
|
char id_attr_str[512];
|
|
1521
1531
|
snprintf(id_attr_str, sizeof(id_attr_str), "id=\"%s\"", header->id);
|
|
1522
1532
|
size_t id_len = strlen(id_attr_str);
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
}
|
|
1533
|
+
APEX_HEADER_ID_ENSURE(id_len);
|
|
1534
|
+
memcpy(write, id_attr_str, id_len);
|
|
1535
|
+
write += id_len;
|
|
1536
|
+
remaining -= id_len;
|
|
1528
1537
|
|
|
1529
1538
|
/* Copy closing '>' */
|
|
1530
1539
|
if (*read == '>') {
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
} else {
|
|
1535
|
-
read++;
|
|
1536
|
-
}
|
|
1540
|
+
APEX_HEADER_ID_ENSURE(1);
|
|
1541
|
+
*write++ = *read++;
|
|
1542
|
+
remaining--;
|
|
1537
1543
|
}
|
|
1538
1544
|
}
|
|
1539
1545
|
} else {
|
|
1540
1546
|
/* No ID to inject, just copy the tag */
|
|
1541
1547
|
size_t tag_len = tag_end - tag_start + 1;
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
}
|
|
1548
|
+
APEX_HEADER_ID_ENSURE(tag_len);
|
|
1549
|
+
memcpy(write, tag_start, tag_len);
|
|
1550
|
+
write += tag_len;
|
|
1551
|
+
remaining -= tag_len;
|
|
1547
1552
|
read = tag_end + 1;
|
|
1548
1553
|
}
|
|
1549
1554
|
} else {
|
|
1550
1555
|
/* Copy character */
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
} else {
|
|
1555
|
-
read++;
|
|
1556
|
-
}
|
|
1556
|
+
APEX_HEADER_ID_ENSURE(1);
|
|
1557
|
+
*write++ = *read++;
|
|
1558
|
+
remaining--;
|
|
1557
1559
|
}
|
|
1558
1560
|
}
|
|
1559
1561
|
|
|
1560
|
-
|
|
1561
|
-
if (remaining < 1) {
|
|
1562
|
-
size_t used = write - output;
|
|
1563
|
-
size_t new_capacity = (used + 1) * 2;
|
|
1564
|
-
char *new_output = realloc(output, new_capacity + 1);
|
|
1565
|
-
if (new_output) {
|
|
1566
|
-
output = new_output;
|
|
1567
|
-
write = output + used;
|
|
1568
|
-
remaining = new_capacity - used;
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1562
|
+
APEX_HEADER_ID_ENSURE(1);
|
|
1571
1563
|
*write = '\0';
|
|
1572
1564
|
|
|
1565
|
+
apex_inject_header_ids_done:
|
|
1566
|
+
#undef APEX_HEADER_ID_ENSURE
|
|
1567
|
+
|
|
1573
1568
|
/* Clean up */
|
|
1574
1569
|
while (header_map) {
|
|
1575
1570
|
header_id_map *next = header_map->next;
|
|
@@ -1769,6 +1764,9 @@ char *apex_convert_relaxed_table_headers(const char *html) {
|
|
|
1769
1764
|
const char *read = html;
|
|
1770
1765
|
char *write = output;
|
|
1771
1766
|
size_t remaining = len * 2;
|
|
1767
|
+
bool demote_next_thead = false;
|
|
1768
|
+
static const char marker[] = "<!--apex-relaxed-table-->";
|
|
1769
|
+
static const size_t marker_len = sizeof(marker) - 1;
|
|
1772
1770
|
|
|
1773
1771
|
while (*read) {
|
|
1774
1772
|
/* Expand buffer if needed */
|
|
@@ -1791,11 +1789,18 @@ char *apex_convert_relaxed_table_headers(const char *html) {
|
|
|
1791
1789
|
remaining = new_capacity - written;
|
|
1792
1790
|
}
|
|
1793
1791
|
|
|
1792
|
+
/* Marker from relaxed-table preprocess: demote the following thead */
|
|
1793
|
+
if (strncmp(read, marker, marker_len) == 0) {
|
|
1794
|
+
demote_next_thead = true;
|
|
1795
|
+
read += marker_len;
|
|
1796
|
+
if (*read == '\n') read++;
|
|
1797
|
+
continue;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1794
1800
|
/* Check for <thead> */
|
|
1795
1801
|
if (strncmp(read, "<thead>", 7) == 0) {
|
|
1796
1802
|
const char *after_thead = read + 7;
|
|
1797
1803
|
const char *thead_end = strstr(after_thead, "</thead>");
|
|
1798
|
-
const char *tbody_start = strstr(after_thead, "<tbody>");
|
|
1799
1804
|
|
|
1800
1805
|
if (thead_end) {
|
|
1801
1806
|
/* Check if thead contains only empty cells (dummy headers from headerless tables) */
|
|
@@ -1864,81 +1869,19 @@ char *apex_convert_relaxed_table_headers(const char *html) {
|
|
|
1864
1869
|
|
|
1865
1870
|
/* If we found th cells and they're all empty, remove the entire thead */
|
|
1866
1871
|
if (found_any_th && all_cells_empty) {
|
|
1872
|
+
demote_next_thead = false;
|
|
1867
1873
|
read = thead_end + 8; /* Skip <thead>...</thead> */
|
|
1868
1874
|
continue;
|
|
1869
1875
|
}
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
|
-
if (thead_end && tbody_start && thead_end < tbody_start) {
|
|
1873
|
-
/* Check if tbody contains a separator row (row with only em dashes) */
|
|
1874
|
-
bool has_separator_row = false;
|
|
1875
|
-
const char *tbody_end = strstr(tbody_start, "</tbody>");
|
|
1876
|
-
const char *table_end = strstr(tbody_start, "</table>");
|
|
1877
|
-
|
|
1878
|
-
if (tbody_end && (!table_end || tbody_end < table_end)) {
|
|
1879
|
-
/* Look for rows with only em dashes in tbody */
|
|
1880
|
-
const char *search = tbody_start;
|
|
1881
|
-
while (search < tbody_end) {
|
|
1882
|
-
if (strncmp(search, "<tr>", 4) == 0) {
|
|
1883
|
-
const char *tr_end = strstr(search, "</tr>");
|
|
1884
|
-
if (tr_end && tr_end < tbody_end) {
|
|
1885
|
-
/* Check if this row contains only em dashes */
|
|
1886
|
-
bool row_is_separator = true;
|
|
1887
|
-
const char *cell_start = search + 4;
|
|
1888
|
-
while (cell_start < tr_end) {
|
|
1889
|
-
if (strncmp(cell_start, "<td", 3) == 0 || strncmp(cell_start, "<th", 3) == 0) {
|
|
1890
|
-
const char *tag_end = strstr(cell_start, ">");
|
|
1891
|
-
if (!tag_end) break;
|
|
1892
|
-
tag_end++;
|
|
1893
|
-
|
|
1894
|
-
const char *cell_end = NULL;
|
|
1895
|
-
if (strncmp(cell_start, "<td", 3) == 0) {
|
|
1896
|
-
cell_end = strstr(tag_end, "</td>");
|
|
1897
|
-
if (cell_end) cell_end += 5;
|
|
1898
|
-
} else {
|
|
1899
|
-
cell_end = strstr(tag_end, "</th>");
|
|
1900
|
-
if (cell_end) cell_end += 5;
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
if (cell_end && cell_end <= tr_end) {
|
|
1904
|
-
if (!cell_contains_only_dashes(tag_end, cell_end - 5)) {
|
|
1905
|
-
row_is_separator = false;
|
|
1906
|
-
break;
|
|
1907
|
-
}
|
|
1908
|
-
cell_start = cell_end;
|
|
1909
|
-
} else {
|
|
1910
|
-
break;
|
|
1911
|
-
}
|
|
1912
|
-
} else {
|
|
1913
|
-
cell_start++;
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
if (row_is_separator) {
|
|
1918
|
-
has_separator_row = true;
|
|
1919
|
-
break;
|
|
1920
|
-
}
|
|
1921
1876
|
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
}
|
|
1926
|
-
} else {
|
|
1927
|
-
search++;
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
/* If there's a separator row, it's a regular table - keep thead */
|
|
1933
|
-
/* If there's no separator row, it's a relaxed table - convert thead to tbody */
|
|
1934
|
-
if (!has_separator_row) {
|
|
1935
|
-
/* Convert thead to tbody */
|
|
1877
|
+
/* Relaxed tables (marked during preprocess): demote thead to tbody */
|
|
1878
|
+
if (demote_next_thead) {
|
|
1879
|
+
demote_next_thead = false;
|
|
1936
1880
|
memcpy(write, "<tbody>", 7);
|
|
1937
1881
|
write += 7;
|
|
1938
1882
|
remaining -= 7;
|
|
1939
1883
|
read += 7; /* Skip <thead> */
|
|
1940
1884
|
|
|
1941
|
-
/* Convert <th> to <td> and skip </thead> */
|
|
1942
1885
|
while (read < thead_end + 8) {
|
|
1943
1886
|
if (strncmp(read, "<th>", 4) == 0) {
|
|
1944
1887
|
memcpy(write, "<td>", 4);
|
|
@@ -1955,7 +1898,6 @@ char *apex_convert_relaxed_table_headers(const char *html) {
|
|
|
1955
1898
|
write += 3;
|
|
1956
1899
|
remaining -= 3;
|
|
1957
1900
|
read += 3;
|
|
1958
|
-
/* Copy attributes until > */
|
|
1959
1901
|
while (*read && *read != '>') {
|
|
1960
1902
|
*write++ = *read++;
|
|
1961
1903
|
remaining--;
|
|
@@ -1965,9 +1907,7 @@ char *apex_convert_relaxed_table_headers(const char *html) {
|
|
|
1965
1907
|
remaining--;
|
|
1966
1908
|
}
|
|
1967
1909
|
} else if (strncmp(read, "</thead>", 8) == 0) {
|
|
1968
|
-
/* Skip </thead> - we'll close tbody later if needed */
|
|
1969
1910
|
read += 8;
|
|
1970
|
-
/* Check if next is <tbody> - if so, skip opening tbody */
|
|
1971
1911
|
const char *next = read;
|
|
1972
1912
|
while (*next && (*next == ' ' || *next == '\n' || *next == '\t')) next++;
|
|
1973
1913
|
if (strncmp(next, "<tbody>", 7) == 0) {
|
|
@@ -1981,6 +1921,8 @@ char *apex_convert_relaxed_table_headers(const char *html) {
|
|
|
1981
1921
|
}
|
|
1982
1922
|
continue;
|
|
1983
1923
|
}
|
|
1924
|
+
|
|
1925
|
+
demote_next_thead = false;
|
|
1984
1926
|
}
|
|
1985
1927
|
}
|
|
1986
1928
|
|