Skip to content

Commit

Permalink
Stop operating handlers on deleted elements
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Jul 29, 2024
1 parent 7ff9eee commit 9641567
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ext/selma/src/rewriter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,10 @@ impl SelmaRewriter {
}));
}

if element.removed() {
return Ok(());
}

let rb_element = SelmaHTMLElement::new(element, ancestors);
let rb_result =
rb_handler.funcall::<_, _, Value>(Self::SELMA_HANDLE_ELEMENT, (rb_element,));
Expand Down
2 changes: 1 addition & 1 deletion lib/selma/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Selma
VERSION = "0.4.3"
VERSION = "0.4.4"
end
Loading

0 comments on commit 9641567

Please sign in to comment.