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

NodeTraversor class should be open instead of internal #293

Open
dioKaratzas opened this issue Feb 11, 2025 · 0 comments · May be fixed by #294
Open

NodeTraversor class should be open instead of internal #293

dioKaratzas opened this issue Feb 11, 2025 · 0 comments · May be fixed by #294

Comments

@dioKaratzas
Copy link

dioKaratzas commented Feb 11, 2025

Describe the issue

The NodeTraversor class is currently internal, which makes it unusable outside the module. Additionally, the traverse(_:) method is marked as open, which has no effect unless the class itself is open.

Steps to reproduce

  1. Try to subclass NodeTraversor in a project that imports SwiftSoup.
  2. Notice that the class is inaccessible.

Expected behavior

The NodeTraversor class should be open so that it can be used and subclassed outside the module.

Proposed solution

Change:

internal class NodeTraversor

With:

open class NodeTraversor

This will align with the existing open func traverse(_:) declaration and allow proper subclassing.

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 a pull request may close this issue.

1 participant