Skip to content

feat(outline): preserve headings across document formats - #19

Open
ddebowczyk wants to merge 2 commits into
firecrawl:mainfrom
ddebowczyk:agent/heading-outline-fidelity
Open

feat(outline): preserve headings across document formats#19
ddebowczyk wants to merge 2 commits into
firecrawl:mainfrom
ddebowczyk:agent/heading-outline-fidelity

Conversation

@ddebowczyk

@ddebowczyk ddebowczyk commented Aug 5, 2026

Copy link
Copy Markdown

Summary

AnyDoc now preserves document-declared heading and outline structure across office, ebook, presentation, and spreadsheet formats.

User impact

  • Restores Markdown headings for DOCX subtitles and style IDs, ODP slide/page names, RTF stylesheet names, EPUB3 navigation and EPUB2 NCX tables of contents, PPT/PPTX title and subtitle signals, spreadsheet sheet names, document metadata, OLE SummaryInformation titles, and RTF info titles.
  • Adds Document.outline in Rust, Node, and Python with ordered level/text/anchor entries for navigation, indexing, chunking, and RAG workflows.
  • Normalizes heading styles and avoids duplicate or empty metadata headings.
  • Adds a guarded placeholder-free PPT/PPTX title heuristic with strict anti-false-positive conditions.
  • Includes producer evidence for ODF and deliberately avoids an unverified text:p style-name heuristic.

Validation

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --locked (191 unit tests, robustness, snapshots)
  • Node build and 13 tests
  • Python binding tests: 8 passed on a supported Python 3.13 environment
  • Built-in benchmark: 0 failures across the baseline corpus; the common 42-file mean moved from 9.79 ms to 10.71 ms (+0.92 ms, +9.4%), with the largest absolute per-file increase at +0.20 ms.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@ddebowczyk ddebowczyk changed the title Improve heading and outline fidelity across formats feat(outline): preserve headings across document formats Aug 5, 2026
@ddebowczyk
ddebowczyk force-pushed the agent/heading-outline-fidelity branch from 458cfe2 to 19ab69d Compare August 5, 2026 15:06
…ne-fidelity

# Conflicts:
#	python/anydoc/__init__.py
#	src/formats/ppt/mod.rs
#	src/formats/rtf/mod.rs
#	src/formats/sheet/mod.rs
#	tests/snapshots/snapshots__epub__book.epub.snap
@ddebowczyk
ddebowczyk marked this pull request as ready for review August 6, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant