actiontext 7.1.3.4 → 7.1.5.1

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.
@@ -94,7 +94,10 @@ module ActionText
94
94
 
95
95
  def render_attachments(**options, &block)
96
96
  content = fragment.replace(ActionText::Attachment.tag_name) do |node|
97
- node["content"] = sanitize_content_attachment(node["content"])
97
+ if node.key?("content")
98
+ sanitized_content = sanitize_content_attachment(node.remove_attribute("content").to_s)
99
+ node["content"] = sanitized_content if sanitized_content.present?
100
+ end
98
101
  block.call(attachment_for_node(node, **options))
99
102
  end
100
103
  self.class.new(content, canonicalize: false)
@@ -9,8 +9,8 @@ module ActionText
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 1
12
- TINY = 3
13
- PRE = "4"
12
+ TINY = 5
13
+ PRE = "1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -63,7 +63,12 @@ module ActionText
63
63
 
64
64
  def plain_text_for_blockquote_node(node, index)
65
65
  text = plain_text_for_block(node)
66
- text.sub(/\A(\s*)(.+?)(\s*)\Z/m, '\1“\2”\3')
66
+ return "“”" if text.blank?
67
+
68
+ text = text.dup
69
+ text.insert(text.rindex(/\S/) + 1, "”")
70
+ text.insert(text.index(/\S/), "“")
71
+ text
67
72
  end
68
73
 
69
74
  def plain_text_for_li_node(node, index)
data/lib/action_text.rb CHANGED
@@ -9,7 +9,7 @@ require "action_text/deprecator"
9
9
  require "nokogiri"
10
10
 
11
11
  # :markup: markdown
12
- # :include: actiontext/README.md
12
+ # :include: ../README.md
13
13
  module ActionText
14
14
  extend ActiveSupport::Autoload
15
15
 
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rails/actiontext",
3
- "version": "7.1.3-4",
3
+ "version": "7.1.501",
4
4
  "description": "Edit and display rich text in Rails applications",
5
5
  "module": "app/assets/javascripts/actiontext.esm.js",
6
6
  "main": "app/assets/javascripts/actiontext.js",
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actiontext
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.3.4
4
+ version: 7.1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javan Makhmali
8
8
  - Sam Stephenson
9
9
  - David Heinemeier Hansson
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-06-04 00:00:00.000000000 Z
13
+ date: 2024-12-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -18,56 +18,56 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 7.1.3.4
21
+ version: 7.1.5.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 7.1.3.4
28
+ version: 7.1.5.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: activerecord
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 7.1.3.4
35
+ version: 7.1.5.1
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 7.1.3.4
42
+ version: 7.1.5.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: activestorage
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 7.1.3.4
49
+ version: 7.1.5.1
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 7.1.3.4
56
+ version: 7.1.5.1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: actionpack
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 7.1.3.4
63
+ version: 7.1.5.1
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 7.1.3.4
70
+ version: 7.1.5.1
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: nokogiri
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -163,12 +163,12 @@ licenses:
163
163
  - MIT
164
164
  metadata:
165
165
  bug_tracker_uri: https://github.com/rails/rails/issues
166
- changelog_uri: https://github.com/rails/rails/blob/v7.1.3.4/actiontext/CHANGELOG.md
167
- documentation_uri: https://api.rubyonrails.org/v7.1.3.4/
166
+ changelog_uri: https://github.com/rails/rails/blob/v7.1.5.1/actiontext/CHANGELOG.md
167
+ documentation_uri: https://api.rubyonrails.org/v7.1.5.1/
168
168
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
169
- source_code_uri: https://github.com/rails/rails/tree/v7.1.3.4/actiontext
169
+ source_code_uri: https://github.com/rails/rails/tree/v7.1.5.1/actiontext
170
170
  rubygems_mfa_required: 'true'
171
- post_install_message:
171
+ post_install_message:
172
172
  rdoc_options: []
173
173
  require_paths:
174
174
  - lib
@@ -183,8 +183,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  - !ruby/object:Gem::Version
184
184
  version: '0'
185
185
  requirements: []
186
- rubygems_version: 3.3.27
187
- signing_key:
186
+ rubygems_version: 3.5.22
187
+ signing_key:
188
188
  specification_version: 4
189
189
  summary: Rich text framework.
190
190
  test_files: []