From 5b7c73afc1d1303ff8f6560e3bfb4a87764266b4 Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Tue, 28 Jul 2026 07:13:54 +0300 Subject: [PATCH] Fix frozen string literal warnings in converter Prevents `FrozenError` in Ruby 3.4.1+ by ensuring string literals are not modified in-place. --- lib/html2markdown/converter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/html2markdown/converter.rb b/lib/html2markdown/converter.rb index 2bb23c9..bda65a1 100644 --- a/lib/html2markdown/converter.rb +++ b/lib/html2markdown/converter.rb @@ -27,7 +27,7 @@ def parse_element(ele) # wrap node with markdown def wrap_node(node,contents=nil) - result = '' + result = String.new contents.strip! unless contents==nil # check if there is a custom parse exist if respond_to? "parse_#{node.name}"