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 HIX value diff when page content has nested tags #2652

Merged
merged 2 commits into from Feb 12, 2024

Conversation

seluianova
Copy link
Contributor

@seluianova seluianova commented Feb 12, 2024

Short description

Using root.iter() was not a good choice to iterate over the paragraphs, because it goes "one-way" deep into the nested elements.
For example, if a page has the following structure:
<div><p>Some image</p><p><a href="some.image"><img src="some.image" alt=""></a></p><p>&nbsp;</p></div>
The iteration will proceed as follows:

<div>
<p>
<p>
<a>
<img>
--> end of iteration

And the last p-node will not be processed.

Proposed changes

Use list(root) instead of root.iter()

Side effects

No?

Resolved issues

Another follow-up to #2577

UPD: added another small HIX-related fix
Fixes: #2621


Pull Request Review Guidelines

@seluianova seluianova requested a review from a team as a code owner February 12, 2024 11:48
Copy link

codeclimate bot commented Feb 12, 2024

Code Climate has analyzed commit 4b21da4 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 82.0% (0.0% change).

View more on Code Climate.

@seluianova
Copy link
Contributor Author

Added another small HIX-related fix for #2621

Copy link
Member

@timobrembeck timobrembeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

integreat_cms/release_notes/current/unreleased/2621.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@JoeyStk JoeyStk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much. LGTM!

@seluianova seluianova merged commit c771961 into develop Feb 12, 2024
5 checks passed
@seluianova seluianova deleted the bugfix/hix-value-difference branch February 12, 2024 23:04
@svenseeberg svenseeberg mentioned this pull request Mar 2, 2024
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.

Reversing changes in the editor does not outdate HIX value
3 participants