collapsible_section 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6bd0344fa11f5b952319376553d4a9c19ca53d70cc82710a9448ca46bb9419a
4
- data.tar.gz: c16ff63ae6980248dd2be299b9329f4508eed7faab0c7605b4e6305aac47a6a8
3
+ metadata.gz: 7d8fea31cac021d56b926b0c3febc46ba967cf183208e19ec78c2048ae7c5d58
4
+ data.tar.gz: ff5ac97b8ebbd1ac56a2fb78ce131852c55d00cb38432109a70f4724f5d22b27
5
5
  SHA512:
6
- metadata.gz: 251052ea1a5423fb04d001c2e2938538319c5b2179e3e1818bcdea87c2c883c9c42e395debc106369332a0251aefbe9ea2c2a1ce5ae5e3a290dca3aa4b353359
7
- data.tar.gz: ab975de1ec7a1a067482ec23dfebeeeb1a1c42b3bfb418f04cbb169cd844c22b5a258d77b52cf9a5bbb5235dc6945cedd0a56390528def9f3220c43c9258bbad
6
+ metadata.gz: 1153527ffc6d8e97d43af886681280a7deeb4755798dc8f6a1698a0b64b2a4f78986110c9c03ca8324724e2112aa60f56ce78623659d546f5a4bdebe5f3b7afa
7
+ data.tar.gz: e1fe51aa2ef20aca36767278e98714d5f81d1c5fadd6c60e893fc3ece38508171837317d8a7f55076f2d5c09f721f4a11571f51718af5f0574bb7184a96e6811
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.2] - 2025-08-04
4
+
5
+ ### Fixed
6
+
7
+ - Fixed HTML content escaping issue within collapsible sections where block content was being double-escaped
8
+
3
9
  ## [0.1.1] - 2025-08-04
4
10
 
5
11
  ### Fixed
data/README.md CHANGED
@@ -7,7 +7,7 @@ A Rails gem that provides a simple helper method to generate HTML5 `<details>` c
7
7
  Add to Gemfile:
8
8
 
9
9
  ```Gemfile
10
- gem 'collapsible_section', '~> 0.1.0'
10
+ gem 'collapsible_section', '~> 0.1.2'
11
11
  ```
12
12
 
13
13
  After building and installing the gem, replace your selected code with:
@@ -43,8 +43,10 @@ gem install collapsible_section
43
43
 
44
44
  ## Development
45
45
 
46
+ ```bash
46
47
  gem build collapsible_section.gemspec
47
- gem push collapsible_section-0.1.0.gem
48
+ gem push collapsible_section-0.1.2.gem
49
+ ```
48
50
 
49
51
  ## Contributing
50
52
 
@@ -5,9 +5,11 @@ module CollapsibleSection
5
5
  def collapsible_section(title, open: true, &block)
6
6
  content_tag(:details, class: "section-collapsable", open: open) do
7
7
  summary_content = content_tag(:h3, title, class: "section-title")
8
- concat content_tag(:summary, summary_content, class: "section-header")
9
- concat capture(&block) if block_given?
10
- end.html_safe
8
+ summary_tag = content_tag(:summary, summary_content, class: "section-header")
9
+ block_content = block_given? ? capture(&block) : ""
10
+
11
+ (summary_tag + block_content).html_safe
12
+ end
11
13
  end
12
14
  end
13
15
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CollapsibleSection
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collapsible_section
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Yenkala