Skip to content

Duplicate paragraph extraction when a long sibling paragraph is present #817

@antonOvchynnikov

Description

@antonOvchynnikov

Minimal reproducer:

<html>
  <body>
    <div id="content">
      <p>
        Authoritative taxonomy of but let's leave it as it is 1 2 3
      </p>
    </div>

    <p>
      some text long enough not to skip and printed twice on this line some text long enough not to skip and printed twice on this line
    </p>
  </body>
</html>

Expected output:

Authoritative taxonomy of but let's leave it as it is 1 2 3
some text long enough not to skip and printed twice on this line ...

Actual output:

Authoritative taxonomy of but let's leave it as it is 1 2 3
Authoritative taxonomy of but let's leave it as it is 1 2 3
some text long enough not to skip and printed twice on this line ...

Key observations:

duplication happens only if:

  1. paragraph length ≥ ~58 chars
  2. another long sibling paragraph exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions