richer_text 0.17.0 → 0.19.0

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: 8a947d5f1461be04bb30aeee9b343ec6e033d7ff3e88b508c1462bf6d52aba31
4
- data.tar.gz: 2a9147231b5d14578330bdec5c4dd44abb5dd47f04e1af29980e996b2ba2430b
3
+ metadata.gz: 5c1451c3d247fb8219bdf6864f676f238100b739004d4aaf39647c69252bcbd7
4
+ data.tar.gz: 8d739523b17f1d38d8d6532db0842a6dadad661175d22382bdb20a6112929f62
5
5
  SHA512:
6
- metadata.gz: 49f192fc0f347e0e378f1763af8524acdd9cd6cd225a96aa8eed8343ee13c165d7e87f98c4c8b3c6dc650d4eee683e6f9fb8e482d416176bbb8c45f1b85d5710
7
- data.tar.gz: 526353531c7358164814011501f473622102e75f168150edf0f6cdf223256632a6335148231bcc3ce442fe0651fe13658b33c095797a5a0abee72501c9340d78
6
+ metadata.gz: 2484cd219fe49d7c0cda66fb6077789acf46b18ac366ba2b5fdb0133a98790db9e1dd8a58854ff484562a6efa48650fa5ad996add75b3ca2be87d54c46648c5a
7
+ data.tar.gz: 9869c6ada748a2b5d49573c7e40a3e2efa1bd093eb3386a3dae90475343707e21c7e9303d2c197d582e006d8586505084241d8c2f5f1f81198d7d6325528ed07
@@ -1,7 +1,7 @@
1
1
  class CreateRicherTextOEmbeds < ActiveRecord::Migration[7.0]
2
2
  def change
3
3
  create_table :richer_text_o_embeds do |t|
4
- t.jsonb :fields
4
+ t.json :fields
5
5
  t.string :url
6
6
 
7
7
  t.timestamps
@@ -33,6 +33,14 @@ module RicherText
33
33
  run "pnpm add highlight.js @afomera/richer-text" if destination.join("pnpm-lock.yaml").exist?
34
34
  end
35
35
 
36
+ if (importmap_path = destination.join("config/importmap.rb")).exist?
37
+ run "curl -Lo ./vendor/javascript/richer-text.js https://unpkg.com/@afomera/richer-text@latest/dist/bundle/index.module.js"
38
+ run "curl -Lo ./app/assets/stylesheets/richer-text.css https://unpkg.com/@afomera/richer-text@2.0.0/dist/css/richer-text.css"
39
+
40
+ say "Adding import to importmap.rb", :green
41
+ append_to_file importmap_path.to_s, %(pin "@afomera/richer-text", to: "richer-text.js"\n)
42
+ end
43
+
36
44
  say "Adding import to application.js", :green
37
45
  append_to_file "app/javascript/application.js", %(import "@afomera/richer-text"\n)
38
46
  end
@@ -35,7 +35,7 @@ module RicherText
35
35
  end
36
36
 
37
37
  def visit_code_block(node)
38
- "<pre><code>#{visit_children(node).join("\n")}</code></pre>"
38
+ "<pre><code>#{ERB::Util.html_escape(visit_children(node).join("\n"))}</code></pre>"
39
39
  end
40
40
 
41
41
  def visit_doc(node)
@@ -1,3 +1,3 @@
1
1
  module RicherText
2
- VERSION = "0.17.0"
2
+ VERSION = "0.19.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: richer_text
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrea Fomera
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-17 00:00:00.000000000 Z
10
+ date: 2025-01-30 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -38,7 +37,6 @@ dependencies:
38
37
  - - ">="
39
38
  - !ruby/object:Gem::Version
40
39
  version: '0'
41
- description:
42
40
  email:
43
41
  - afomera@hey.com
44
42
  executables: []
@@ -112,7 +110,6 @@ licenses:
112
110
  - MIT
113
111
  metadata:
114
112
  homepage_uri: https://github.com/afomera/richer_text
115
- post_install_message:
116
113
  rdoc_options: []
117
114
  require_paths:
118
115
  - lib
@@ -127,8 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
124
  - !ruby/object:Gem::Version
128
125
  version: '0'
129
126
  requirements: []
130
- rubygems_version: 3.5.3
131
- signing_key:
127
+ rubygems_version: 3.6.2
132
128
  specification_version: 4
133
129
  summary: A richer text editor for Rails
134
130
  test_files: []