Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect missing of trimming all-space text events when trim_text_start = false and trim_text_end = true #755

Merged
merged 13 commits into from
Jun 14, 2024

Commits on Jun 14, 2024

  1. Remove unnecessary code block in read_bytes_until

    (Review in whitespace changes ignored mode)
    Mingun committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    1de2c8f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    77b8212 View commit details
    Browse the repository at this point in the history
  3. Remove done variable

    Mingun committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    2032c1f View commit details
    Browse the repository at this point in the history
  4. Remove duplicated code - go to the ClosedTag state and perform operat…

    …ion in next iteration of loop
    Mingun committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    a52874b View commit details
    Browse the repository at this point in the history
  5. Introduce read_text - a copy of read_bytes_until with hardcoded `…

    …byte` parameter to b'<'
    Mingun committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    03d4081 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    37bb597 View commit details
    Browse the repository at this point in the history
  7. Merge skip_one into read_text

    (Review in whitespace changes ignored mode)
    Mingun committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    01ce06f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    955658f View commit details
    Browse the repository at this point in the history
  9. Go to Exit state immediately after receiving Eof when reading text

    Previously we stay in ClosedTag state and after reaching EOF in it
    in next read_event make two XmlSource calls that
    Mingun committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    0941f08 View commit details
    Browse the repository at this point in the history
  10. Rename some internal ParseStates for clarity:

    - OpenedTag -> InsideMarkup
    - ClosedTag -> InsideText
    - Empty     -> InsideEmpty
    - Exit      -> Done
    Mingun committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    306b042 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    573df5e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    31177ec View commit details
    Browse the repository at this point in the history
  13. Fix incorrect missing of trimming all-space text events when trim_tex…

    …t_start = false and trim_text_end = true
    
    This is still not complete fix, because we will generate empty Event::Text although we should not do that,
    but it is hard to prevent generation of such event. Moreover it would be better to remove ability of
    automatic trimming completely, because it is anyway does not work correctly -- events should not be
    trimmed at boundary of text / CDATA, or text / PI, or text / comment in some cases
    Mingun committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    7558577 View commit details
    Browse the repository at this point in the history