effective_bootstrap 0.12.1 → 0.12.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: 2eda37da109debf0dd81d3ad6123a3355ac2d1407f82c596388732ea4810fd20
4
- data.tar.gz: 3c9a1e9ebf347a914f975e0d74b6c617bddb0a99448f1cbc57d871dbda6f267f
3
+ metadata.gz: 5296ba7292f9b780d79685a52f5c53de73f7fb80de3a099115c7abe559c1d18a
4
+ data.tar.gz: 292220fbef842eac68437b113a3500d56e543aa63ee544b72adae14516eef0a5
5
5
  SHA512:
6
- metadata.gz: 79f1b25a831bfbd5a24e7ca9f96e507a4af85dbe918f311c788fb29034c86557e6df38a71cba0dc972c3e2a9c9cd03d8017aab71ba747cf663cf021c3cea8abb
7
- data.tar.gz: ec23c44ef0524a34d16b674c024b0d76e75361eebb729c547c9a33233e7a737c13a8716e0ae7d2bd1ab588699c9e9a911c1dd73ed2f289bd639a05b94a9b87f7
6
+ metadata.gz: 60dabb6bded71c7ef63cf2db2da7a26c49d87ea8f718b4ef22a2f3ce7bdbf06eec816fa3ec1eae2975c0520e88ac1d88ca6f2cef10061b7ba1bb4eb6a76cd284
7
+ data.tar.gz: d24add4acadda8aa959bbd93efbcdacfc687220106377dc6ec79061bdc0dd7c8e7d87ad6f3ce320ba711cfe48f61379a6b37fd1fd2a4260badcca5a7d7235c14
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EffectiveArticleEditorHelper
4
+ ACTION_TEXT_ATTACHMENTS = Regexp.new("<action-text-attachment.*?<\/action-text-attachment>")
4
5
 
5
6
  def render_article_editor_action_text_content(content)
6
7
  raise('expected content to be an ActionText content') unless content.kind_of?(ActionText::Content)
@@ -8,11 +9,7 @@ module EffectiveArticleEditorHelper
8
9
  rendered = content.to_html
9
10
 
10
11
  if rendered.include?('effective-article-editor')
11
- doc = Nokogiri::HTML(rendered)
12
- doc.search('action-text-attachment').each { |fragment| fragment.remove }
13
-
14
- # Filter out <html><body>\n and \n</body></html>
15
- rendered = doc.inner_html.to_s[13..-16]
12
+ rendered.gsub!(ACTION_TEXT_ATTACHMENTS, '')
16
13
  end
17
14
 
18
15
  rendered.html_safe
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.12.1'.freeze
2
+ VERSION = '0.12.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-09 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails