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

block_builder: promotee tags might have siblings #174

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahayzen-kdab
Copy link

eg

<div>
    <blockquote></blockquote>
    <tag></tag>
    <blockquote></blockquote>
</div>

Needs to become

<blockquote></blockquote>
<div>
    <tag></tag>
</div>
<blockquote></blockquote>

Before it became

<blockquote></blockquote>

This solves the following crash
ValueError: Cannot replace one element with another when the element to be replaced is not part of a tree.

Related #141

(Description)

Ticket URL: #141


Testing

  • CI passes
  • If necessary, tests are added for new or fixed behaviour
  • These changes do not reduce test coverage

Documentation.

  • This PR adds or updates documentation
  • Documentation changes are not necessary because:

eg

```html
<div>
    <blockquote></blockquote>
    <tag></tag>
    <blockquote></blockquote>
</div>
```

Needs to become
```html
<blockquote></blockquote>
<div>
    <tag></tag>
</div>
<blockquote></blockquote>
```

Before it became
```html
<blockquote></blockquote>
```

This solves the following crash
ValueError: Cannot replace one element with another when the element to be replaced is not part of a tree.

Related torchbox#141
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.

1 participant