tiptap-ruby 0.9.1 → 0.9.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: 76bcdc2f87339f0f86447e4acda4807dfa6a2939ffd6a13e2838fb20e06ebfa9
4
- data.tar.gz: 2d773e0bb03de5cbdf4cec7461678391cf6478eec2dea925a930d9c193efbfb1
3
+ metadata.gz: '0492d7a3d71f1c04116a24773305134ed9c6c91170efa6dc34689a2acb9b2cdc'
4
+ data.tar.gz: a2ad51ac535e7d610cf769be234ce0c3fd3e3812712db7349c3f049c6322ca14
5
5
  SHA512:
6
- metadata.gz: fd3281ee6f2357c1dc054cafd79e1a05ea20715658f0313a4c7b8011fef823ad2e2a6046efa0b3a007e87f2b416af199d7e5fe953684b6d7cbc9f08a81988698
7
- data.tar.gz: a118384357347da5f693349182cc37be4989db5153bb5b853ba14e6a03726609eb5ed997816e1a60f86f60662f9fc010f38a46ae904b0eb8d2f9bf55209db5b2
6
+ metadata.gz: 9a7e0d12c58cc24772e41d531d0e2ddf2e2b96fdc6a7722204884231e1dd4839e26abb1158ae6c1866cda0f82bad6a2151a32cf15e179370231d3795052e122e
7
+ data.tar.gz: d2582ec30236b67a8df45f3a8eb65c5d00a3d0fa8b45feab7497a01663d2845992b67dbd48080ca0b0abeadef9be9be4ad7d16cdf56af033c5d012b8dc591fbc
@@ -11,6 +11,13 @@ module TipTap
11
11
  def text(text, marks: [])
12
12
  add_content(Text.new(text, marks: marks))
13
13
  end
14
+
15
+ # Override the default to_plain_text method to account for the nested Text nodes
16
+ # we don't want to use the separator when joining the text nodes since it could
17
+ # be a newline or some other character that we don't want to include in the plain text
18
+ def to_plain_text(separator: " ")
19
+ content.map { |node| node.to_plain_text(separator: separator) }.join("")
20
+ end
14
21
  end
15
22
  end
16
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TipTap
4
- VERSION = "0.9.1"
4
+ VERSION = "0.9.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiptap-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Wilken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-15 00:00:00.000000000 Z
11
+ date: 2024-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
- rubygems_version: 3.3.13
98
+ rubygems_version: 3.4.6
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Parse, generate and render TipTap documents in Ruby.