Skip to content

fix: Apply traverse class filter to source when include_source=True#158

Merged
pbodnar merged 1 commit intomiyuchina:masterfrom
asb:change-traverse-include-source
Sep 3, 2022
Merged

fix: Apply traverse class filter to source when include_source=True#158
pbodnar merged 1 commit intomiyuchina:masterfrom
asb:change-traverse-include-source

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.
asb added a commit to muxup/muxup-site that referenced this pull request Nov 24, 2024
…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