collapsible_section 0.1.1 → 0.1.3

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: efa4b077e87507d2cde4bd1568c252955c81e0156f00f8e6ef99f3404d5b3aa6
4
+ data.tar.gz: 6b9b3d72caeb633e42dc5f40aa5ee2e374ce3dab34b08513efc57a350f1edff2
5
5
  SHA512:
6
- metadata.gz: 251052ea1a5423fb04d001c2e2938538319c5b2179e3e1818bcdea87c2c883c9c42e395debc106369332a0251aefbe9ea2c2a1ce5ae5e3a290dca3aa4b353359
7
- data.tar.gz: ab975de1ec7a1a067482ec23dfebeeeb1a1c42b3bfb418f04cbb169cd844c22b5a258d77b52cf9a5bbb5235dc6945cedd0a56390528def9f3220c43c9258bbad
6
+ metadata.gz: cc91fca90bbbb250fb719c4f24b507408006c45a975afba62996902832fd2ea266a367bf2d8610f73ebf67d95978e119144691cfe9bd09322db8aad4cbb05502
7
+ data.tar.gz: 93d3ad60bb6f5b185f97752e8d8b8d11274c6e937b69cee37f58e917c89539f743f0fc8a8ff3bed94d74649748c42d2e025a97373ab6658deb9440201ba9e797
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.3"
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.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Yenkala