发布

  • feat: add page number support to v1 html partition (#4327)

    frostbyte_neo 发布于 2026-04-08 13:33:48 +00:00

    This PR adds support for page-number when partitioning html using the v1
    parser.

    • Add page_number support to the v1 HTML parser by reading
      data-page-number attributes from ancestor elements, consistent with v2
      parser behavior
    • Add _page_number cached property on Flow using efficient
      parent-chain lookup (O(n) total vs O(n*depth) ancestor walk)
    • Wire page number into all three element-creation paths: text elements,
      images, and tables
    • Malformed data-page-number values are skipped and fall back to the
      nearest valid ancestor
    下载附件