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: Apply traverse class filter to source when include_source=True #158

Merged
merged 1 commit into from
Sep 3, 2022

Conversation

asb
Copy link
Contributor

@asb asb commented Sep 2, 2022

Previously, any class filter given to traverse wouldn't be respected
for the source node (returned if include_source=True). This patch
addresses this.

This is considered a bug fix as opposed to a breaking change because:

  • Filtering by class was broken anyway in the last mistletoe release.
  • It is unintuitive and likely unintended for the filter not to apply to
    the source node.

Previously, any class filter given to `traverse` wouldn't be respected
for the source node (returned if `include_source=True`). This patch
addresses this, and also adds a test for traverse with no additional
arguments.

This is considered a bug fix as opposed to a breaking change because:
* Filtering by class was broken anyway in the last mistletoe release.
* It is unintuitive and likely unintended for the filter not to apply to
  the source node.
@asb asb force-pushed the change-traverse-include-source branch from 05b3a0a to cfaec86 Compare September 2, 2022 08:02
@pbodnar pbodnar merged commit c696f01 into miyuchina:master Sep 3, 2022
@pbodnar
Copy link
Collaborator

pbodnar commented Sep 3, 2022

@asb, a pro work, thank you :)

@pbodnar pbodnar mentioned this pull request Jan 7, 2023
asb added a commit to muxup/muxup-site that referenced this pull request Feb 27, 2023
…se is fixed

Now my fixes <miyuchina/mistletoe#157>
<miyuchina/mistletoe#158>
<miyuchina/mistletoe#159> are in a released
version, just use the upstream traverse implementation.
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.

2 participants