Description: Update tests for libxml2 2.14+ HTML parser changes
 libxml2 2.14 fully conforms to the HTML5 specification and no longer
 creates non-standard implied <p> tags around loose text nodes in the
 body. It also no longer raises encoding errors on invalid byte
 sequences in the same way.
Author: Simon Quigley <tsimonq2@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/1107540
Forwarded: not-needed
Last-Update: 2026-02-24
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/spec/lib/reverse_markdown_spec.rb
+++ b/spec/lib/reverse_markdown_spec.rb
@@ -37,11 +37,11 @@ describe ReverseMarkdown do
     describe 'force_encoding option', jruby: :exclude do
       it 'raises invalid byte sequence in UTF-8 exception' do
         # Older versions of ruby used to raise ArgumentError here. Remove when we drop support for 3.1.
-        expect { ReverseMarkdown.convert("hi \255") }.to raise_error { [Encoding::CompatibilityError, ArgumentError].include?(_1.class) }
+        expect { ReverseMarkdown.convert("hi \255") }.not_to raise_error
       end
 
       it 'handles invalid byte sequence if option is set' do
-        expect(ReverseMarkdown.convert("hi \255", force_encoding: true)).to eq "hi\n\n"
+        expect(ReverseMarkdown.convert("hi \255", force_encoding: true)).to eq "hi "
       end
     end
   end
