markdown_views 3.2.1 → 3.3.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: 22fd9dc1ebc13a174e9929445039e9cddcdf90dec5b52b4652e1f3dff8ac9967
4
- data.tar.gz: 7b8ad429986332b8fc6b01ec388fbf4bbee1daa213d0a6e72947c5b247bd4c53
3
+ metadata.gz: 6942fee7095af6d2ca65e12a2ae0800bed73bbe0734fc1078f042df6484af12e
4
+ data.tar.gz: b1958b068bba6947ed0ec03ac977b50c843b5eca4ab3d521d8fe68f5b03b1335
5
5
  SHA512:
6
- metadata.gz: 7caa7c9240cfd6f774e723baf009f95402c7aa32b6df1b15cad493a5624556ed9c176f8a8cc8f9fb10684c30ab42038a939f9be669bacef0a2b243139c295c2e
7
- data.tar.gz: 1fa0822da4cb188a490dd70466c0acbfb0efec5ecf5ca848e9438da24010fe7e5392186964ccbf3180feb93ca9b6bf43180cc0ec2f514f656442bd322e2dd00f
6
+ metadata.gz: c200fb78f978e914f614088b3ccaeb35fe8d8b6f4c730978ce030ca8e52fa7dea6c35ff78a8ccd0f1af486805b2c97f3aac794fcad419f14e525814fa9687cbf
7
+ data.tar.gz: f84e59dd16fb70a3bdebd17c35927af0d27d8e783b9518ba6741b2327d97409621d87dfd49ab403be12db1b213fee6706ad48ef8e78c778154acc9921f9e5bbe
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in markdown_views.gemspec
4
4
  gemspec
5
+
6
+ gem 'minitest', '~> 6'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- markdown_views (3.2.1)
4
+ markdown_views (3.3.0)
5
5
  commonmarker (>= 1.1, < 3.0)
6
6
  rails (>= 6.1)
7
7
  rouge (~> 4)
@@ -10,31 +10,31 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- action_text-trix (2.1.15)
13
+ action_text-trix (2.1.18)
14
14
  railties
15
- actioncable (8.1.1)
16
- actionpack (= 8.1.1)
17
- activesupport (= 8.1.1)
15
+ actioncable (8.1.3)
16
+ actionpack (= 8.1.3)
17
+ activesupport (= 8.1.3)
18
18
  nio4r (~> 2.0)
19
19
  websocket-driver (>= 0.6.1)
20
20
  zeitwerk (~> 2.6)
21
- actionmailbox (8.1.1)
22
- actionpack (= 8.1.1)
23
- activejob (= 8.1.1)
24
- activerecord (= 8.1.1)
25
- activestorage (= 8.1.1)
26
- activesupport (= 8.1.1)
21
+ actionmailbox (8.1.3)
22
+ actionpack (= 8.1.3)
23
+ activejob (= 8.1.3)
24
+ activerecord (= 8.1.3)
25
+ activestorage (= 8.1.3)
26
+ activesupport (= 8.1.3)
27
27
  mail (>= 2.8.0)
28
- actionmailer (8.1.1)
29
- actionpack (= 8.1.1)
30
- actionview (= 8.1.1)
31
- activejob (= 8.1.1)
32
- activesupport (= 8.1.1)
28
+ actionmailer (8.1.3)
29
+ actionpack (= 8.1.3)
30
+ actionview (= 8.1.3)
31
+ activejob (= 8.1.3)
32
+ activesupport (= 8.1.3)
33
33
  mail (>= 2.8.0)
34
34
  rails-dom-testing (~> 2.2)
35
- actionpack (8.1.1)
36
- actionview (= 8.1.1)
37
- activesupport (= 8.1.1)
35
+ actionpack (8.1.3)
36
+ actionview (= 8.1.3)
37
+ activesupport (= 8.1.3)
38
38
  nokogiri (>= 1.8.5)
39
39
  rack (>= 2.2.4)
40
40
  rack-session (>= 1.0.1)
@@ -42,36 +42,36 @@ GEM
42
42
  rails-dom-testing (~> 2.2)
43
43
  rails-html-sanitizer (~> 1.6)
44
44
  useragent (~> 0.16)
45
- actiontext (8.1.1)
45
+ actiontext (8.1.3)
46
46
  action_text-trix (~> 2.1.15)
47
- actionpack (= 8.1.1)
48
- activerecord (= 8.1.1)
49
- activestorage (= 8.1.1)
50
- activesupport (= 8.1.1)
47
+ actionpack (= 8.1.3)
48
+ activerecord (= 8.1.3)
49
+ activestorage (= 8.1.3)
50
+ activesupport (= 8.1.3)
51
51
  globalid (>= 0.6.0)
52
52
  nokogiri (>= 1.8.5)
53
- actionview (8.1.1)
54
- activesupport (= 8.1.1)
53
+ actionview (8.1.3)
54
+ activesupport (= 8.1.3)
55
55
  builder (~> 3.1)
56
56
  erubi (~> 1.11)
57
57
  rails-dom-testing (~> 2.2)
58
58
  rails-html-sanitizer (~> 1.6)
59
- activejob (8.1.1)
60
- activesupport (= 8.1.1)
59
+ activejob (8.1.3)
60
+ activesupport (= 8.1.3)
61
61
  globalid (>= 0.3.6)
62
- activemodel (8.1.1)
63
- activesupport (= 8.1.1)
64
- activerecord (8.1.1)
65
- activemodel (= 8.1.1)
66
- activesupport (= 8.1.1)
62
+ activemodel (8.1.3)
63
+ activesupport (= 8.1.3)
64
+ activerecord (8.1.3)
65
+ activemodel (= 8.1.3)
66
+ activesupport (= 8.1.3)
67
67
  timeout (>= 0.4.0)
68
- activestorage (8.1.1)
69
- actionpack (= 8.1.1)
70
- activejob (= 8.1.1)
71
- activerecord (= 8.1.1)
72
- activesupport (= 8.1.1)
68
+ activestorage (8.1.3)
69
+ actionpack (= 8.1.3)
70
+ activejob (= 8.1.3)
71
+ activerecord (= 8.1.3)
72
+ activesupport (= 8.1.3)
73
73
  marcel (~> 1.0)
74
- activesupport (8.1.1)
74
+ activesupport (8.1.3)
75
75
  base64
76
76
  bigdecimal
77
77
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -84,33 +84,34 @@ GEM
84
84
  securerandom (>= 0.3)
85
85
  tzinfo (~> 2.0, >= 2.0.5)
86
86
  uri (>= 0.13.1)
87
- ansi (1.5.0)
87
+ ansi (1.6.0)
88
88
  base64 (0.3.0)
89
- bigdecimal (3.3.1)
89
+ bigdecimal (4.1.2)
90
90
  builder (3.3.0)
91
- commonmarker (2.6.0-aarch64-linux)
92
- commonmarker (2.6.0-arm64-darwin)
93
- commonmarker (2.6.0-x86_64-darwin)
94
- commonmarker (2.6.0-x86_64-linux)
95
- concurrent-ruby (1.3.5)
96
- connection_pool (3.0.1)
91
+ commonmarker (2.8.1-aarch64-linux)
92
+ commonmarker (2.8.1-arm64-darwin)
93
+ commonmarker (2.8.1-x86_64-darwin)
94
+ commonmarker (2.8.1-x86_64-linux)
95
+ concurrent-ruby (1.3.6)
96
+ connection_pool (3.0.2)
97
97
  crass (1.0.6)
98
- date (3.5.0)
98
+ date (3.5.1)
99
99
  drb (2.2.3)
100
- erb (6.0.0)
100
+ erb (6.0.4)
101
101
  erubi (1.13.1)
102
102
  globalid (1.3.0)
103
103
  activesupport (>= 6.1)
104
- i18n (1.14.7)
104
+ i18n (1.14.8)
105
105
  concurrent-ruby (~> 1.0)
106
- io-console (0.8.1)
107
- irb (1.15.3)
106
+ io-console (0.8.2)
107
+ irb (1.18.0)
108
108
  pp (>= 0.6.0)
109
+ prism (>= 1.3.0)
109
110
  rdoc (>= 4.0.0)
110
111
  reline (>= 0.4.2)
111
- json (2.17.1)
112
+ json (2.19.4)
112
113
  logger (1.7.0)
113
- loofah (2.24.1)
114
+ loofah (2.25.1)
114
115
  crass (~> 1.0.2)
115
116
  nokogiri (>= 1.12.0)
116
117
  mail (2.9.0)
@@ -121,13 +122,15 @@ GEM
121
122
  net-smtp
122
123
  marcel (1.1.0)
123
124
  mini_mime (1.1.5)
124
- minitest (5.26.2)
125
- minitest-reporters (1.7.1)
125
+ minitest (6.0.6)
126
+ drb (~> 2.0)
127
+ prism (~> 1.5)
128
+ minitest-reporters (1.8.0)
126
129
  ansi
127
130
  builder
128
- minitest (>= 5.0)
131
+ minitest (>= 5.0, < 7)
129
132
  ruby-progressbar
130
- net-imap (0.5.12)
133
+ net-imap (0.6.4)
131
134
  date
132
135
  net-protocol
133
136
  net-pop (0.1.2)
@@ -137,72 +140,73 @@ GEM
137
140
  net-smtp (0.5.1)
138
141
  net-protocol
139
142
  nio4r (2.7.5)
140
- nokogiri (1.18.10-aarch64-linux-gnu)
143
+ nokogiri (1.19.3-aarch64-linux-gnu)
141
144
  racc (~> 1.4)
142
- nokogiri (1.18.10-arm64-darwin)
145
+ nokogiri (1.19.3-arm64-darwin)
143
146
  racc (~> 1.4)
144
- nokogiri (1.18.10-x86_64-darwin)
147
+ nokogiri (1.19.3-x86_64-darwin)
145
148
  racc (~> 1.4)
146
- nokogiri (1.18.10-x86_64-linux-gnu)
149
+ nokogiri (1.19.3-x86_64-linux-gnu)
147
150
  racc (~> 1.4)
148
151
  pp (0.6.3)
149
152
  prettyprint
150
153
  prettyprint (0.2.0)
151
- psych (5.2.6)
154
+ prism (1.9.0)
155
+ psych (5.3.1)
152
156
  date
153
157
  stringio
154
158
  racc (1.8.1)
155
- rack (3.2.4)
156
- rack-session (2.1.1)
159
+ rack (3.2.6)
160
+ rack-session (2.1.2)
157
161
  base64 (>= 0.1.0)
158
162
  rack (>= 3.0.0)
159
163
  rack-test (2.2.0)
160
164
  rack (>= 1.3)
161
165
  rackup (2.3.1)
162
166
  rack (>= 3)
163
- rails (8.1.1)
164
- actioncable (= 8.1.1)
165
- actionmailbox (= 8.1.1)
166
- actionmailer (= 8.1.1)
167
- actionpack (= 8.1.1)
168
- actiontext (= 8.1.1)
169
- actionview (= 8.1.1)
170
- activejob (= 8.1.1)
171
- activemodel (= 8.1.1)
172
- activerecord (= 8.1.1)
173
- activestorage (= 8.1.1)
174
- activesupport (= 8.1.1)
167
+ rails (8.1.3)
168
+ actioncable (= 8.1.3)
169
+ actionmailbox (= 8.1.3)
170
+ actionmailer (= 8.1.3)
171
+ actionpack (= 8.1.3)
172
+ actiontext (= 8.1.3)
173
+ actionview (= 8.1.3)
174
+ activejob (= 8.1.3)
175
+ activemodel (= 8.1.3)
176
+ activerecord (= 8.1.3)
177
+ activestorage (= 8.1.3)
178
+ activesupport (= 8.1.3)
175
179
  bundler (>= 1.15.0)
176
- railties (= 8.1.1)
180
+ railties (= 8.1.3)
177
181
  rails-dom-testing (2.3.0)
178
182
  activesupport (>= 5.0.0)
179
183
  minitest
180
184
  nokogiri (>= 1.6)
181
- rails-html-sanitizer (1.6.2)
182
- loofah (~> 2.21)
185
+ rails-html-sanitizer (1.7.0)
186
+ loofah (~> 2.25)
183
187
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
184
- railties (8.1.1)
185
- actionpack (= 8.1.1)
186
- activesupport (= 8.1.1)
188
+ railties (8.1.3)
189
+ actionpack (= 8.1.3)
190
+ activesupport (= 8.1.3)
187
191
  irb (~> 1.13)
188
192
  rackup (>= 1.0.0)
189
193
  rake (>= 12.2)
190
194
  thor (~> 1.0, >= 1.2.2)
191
195
  tsort (>= 0.2)
192
196
  zeitwerk (~> 2.6)
193
- rake (13.3.1)
194
- rdoc (6.16.1)
197
+ rake (13.4.2)
198
+ rdoc (7.2.0)
195
199
  erb
196
200
  psych (>= 4.0.0)
197
201
  tsort
198
202
  reline (0.6.3)
199
203
  io-console (~> 0.5)
200
- rouge (4.6.1)
204
+ rouge (4.7.0)
201
205
  ruby-progressbar (1.13.0)
202
206
  securerandom (0.4.1)
203
- stringio (3.1.9)
204
- thor (1.4.0)
205
- timeout (0.4.4)
207
+ stringio (3.2.0)
208
+ thor (1.5.0)
209
+ timeout (0.6.1)
206
210
  tsort (0.2.0)
207
211
  tzinfo (2.0.6)
208
212
  concurrent-ruby (~> 1.0)
@@ -212,7 +216,7 @@ GEM
212
216
  base64
213
217
  websocket-extensions (>= 0.1.0)
214
218
  websocket-extensions (0.1.5)
215
- zeitwerk (2.7.3)
219
+ zeitwerk (2.7.5)
216
220
 
217
221
  PLATFORMS
218
222
  aarch64-linux
@@ -222,6 +226,7 @@ PLATFORMS
222
226
 
223
227
  DEPENDENCIES
224
228
  markdown_views!
229
+ minitest (~> 6)
225
230
  minitest-reporters
226
231
  rake
227
232
 
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014-2025 thomas morgan
1
+ Copyright 2014-2026 thomas morgan
2
2
 
3
3
  MIT License
4
4
 
data/Rakefile CHANGED
@@ -16,6 +16,7 @@ Rake::TestTask.new(:test) do |t|
16
16
  t.libs << "test"
17
17
  t.libs << "lib"
18
18
  t.test_files = FileList["test/**/*_test.rb"]
19
+ t.warning = false # rouge is very noisy
19
20
  end
20
21
 
21
22
  task :default => :test
@@ -13,6 +13,7 @@ module MarkdownViews
13
13
  autolink: true,
14
14
  tasklist: false,
15
15
  header_ids: nil,
16
+ header_id_prefix: nil,
16
17
  shortcodes: false,
17
18
  cjk_friendly_emphasis: true,
18
19
  )
@@ -3,7 +3,7 @@ module MarkdownViews
3
3
  class << self
4
4
 
5
5
  def render(template)
6
- out = template.to_s
6
+ out = template.to_s.encode('UTF-8')
7
7
  out = strip_comments(out) if MarkdownViews.strip_comments
8
8
  out = render_md(out)
9
9
  out = strip_comments(out) if MarkdownViews.strip_comments
@@ -1,3 +1,3 @@
1
1
  module MarkdownViews
2
- VERSION = '3.2.1'
2
+ VERSION = '3.3.0'
3
3
  end
data/test/config_test.rb CHANGED
@@ -12,6 +12,7 @@ class ConfigTest < Minitest::Test
12
12
  tasklist: false,
13
13
  superscript: false,
14
14
  # header_ids: '',
15
+ header_id_prefix_in_href: false,
15
16
  footnotes: false,
16
17
  inline_footnotes: false,
17
18
  description_lists: false,
@@ -30,7 +31,11 @@ class ConfigTest < Minitest::Test
30
31
  alerts: false,
31
32
  cjk_friendly_emphasis: true,
32
33
  highlight: false,
34
+ insert: false,
35
+ block_directive: false,
33
36
  }
37
+ expected.except! :header_id_prefix_in_href, :block_directive if Commonmarker::VERSION < '2.8'
38
+ expected.except! :insert if Commonmarker::VERSION < '2.7'
34
39
  assert_equal expected, processed
35
40
  end
36
41
 
@@ -42,7 +47,10 @@ class ConfigTest < Minitest::Test
42
47
  relaxed_tasklist_matching: false,
43
48
  relaxed_autolinks: false,
44
49
  leave_footnote_definitions: false,
50
+ ignore_setext: false,
51
+ sourcepos_chars: false,
45
52
  }
53
+ expected.except! :sourcepos_chars if Commonmarker::VERSION < '2.8'
46
54
  assert_equal expected, processed
47
55
  end
48
56
 
@@ -65,12 +73,13 @@ class ConfigTest < Minitest::Test
65
73
  escape: false,
66
74
  sourcepos: false,
67
75
  escaped_char_spans: false,
68
- ignore_setext: false,
69
76
  ignore_empty_links: false,
70
77
  gfm_quirks: false,
71
78
  prefer_fenced: false,
72
79
  tasklist_classes: false,
80
+ compact_html: false,
73
81
  }
82
+ expected.except! :compact_html if Commonmarker::VERSION < '2.7'
74
83
  assert_equal expected, processed
75
84
  end
76
85
 
data/test/render_test.rb CHANGED
@@ -42,6 +42,31 @@ class RenderTest < Minitest::Test
42
42
  assert_equal o, render(s)
43
43
  end
44
44
 
45
+ def test_integer
46
+ o = <<~HTML
47
+ <p>314</p>
48
+ HTML
49
+ assert_equal o, render(314)
50
+ end
51
+
52
+ def test_float
53
+ o = <<~HTML
54
+ <p>3.14</p>
55
+ HTML
56
+ assert_equal o, render(3.14)
57
+ end
58
+
59
+ def test_bigdecimal
60
+ o = <<~HTML
61
+ <p>3.14</p>
62
+ HTML
63
+ assert_equal o, render(BigDecimal('3.14'))
64
+ end
65
+
66
+ def test_nil
67
+ assert_equal '', render(nil)
68
+ end
69
+
45
70
 
46
71
  def render(*args)
47
72
  MarkdownViews::Renderer.render(*args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_views
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan