-
Notifications
You must be signed in to change notification settings - Fork 203
Support for starting from a progression in the HTML content iterator#597
Merged
mickael-menu merged 2 commits intodevelopfrom May 28, 2025
Merged
Support for starting from a progression in the HTML content iterator#597mickael-menu merged 2 commits intodevelopfrom
mickael-menu merged 2 commits intodevelopfrom
Conversation
Member
Added
Shared
- Support for starting from a progression in the HTML content iterator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables the HTML content iterator to begin from a given progression value by adjusting its start index, adds a corresponding unit test, and updates the changelog.
- Update how the
elementsTaskresult is unwrapped - Introduce progression-based
startIndexadjustment in the iterator - Add a new test and document the change in
CHANGELOG.md
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Tests/SharedTests/Publication/Services/Content/Iterators/HTMLResourceContentIteratorTests.swift | Added testStartingFromProgression to verify iteration begins at the correct element for a given progression |
| Sources/Shared/Publication/Services/Content/Iterators/HTMLResourceContentIterator.swift | Changed elementsTask unwrapping, and injected logic to set the iterator start based on a progression locator |
| CHANGELOG.md | Logged "Support for starting from a progression in the HTML content iterator." under the Navigator section |
Comments suppressed due to low confidence (1)
Sources/Shared/Publication/Services/Content/Iterators/HTMLResourceContentIterator.swift:97
- The Task closure now returns a publisher rather than a Result, so calling
.get()onelementsTask.valuewill not compile. Either restore the internaltry result.get()inside the Task or adjust the Task's return to unwrap before returning.
try await elementsTask.value.get()
Sources/Shared/Publication/Services/Content/Iterators/HTMLResourceContentIterator.swift
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.