nexmo_markdown_renderer 0.8.0 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b99304f43d7530fad183956d84883ee41eae9fe3fd124e212f0da02f4d4c5436
4
- data.tar.gz: e79325576839554fcdd82fe761b6c74c539fc15c61046841d6e9f4fd3fa24a79
3
+ metadata.gz: 4906bea77681b55c935fdbb6d42d29d1307e04024a3c8b3555a153008a95e3b0
4
+ data.tar.gz: cd8b09aaa9bfc18de1370a97a6a62b9ad349d3c977b39f4cebfdf92451f074af
5
5
  SHA512:
6
- metadata.gz: 10e9ee85633c905346fcca22afc6e60425971740866b17fb3b95da36c5c2c2abba2799d1fb5358c785c2af27c42fb2f59b3924233420a9d4fba3f7b4975e32e5
7
- data.tar.gz: b3ec25cfa5e861d617d97e0a6a20da1ff8b74c4dd02196642a160875970acbaf225cfe995e47ed0a8d3401d52fc1e5c45cf3e468d86f16b348b5d49fa3f14331
6
+ metadata.gz: 7a264ecc51348e47ccbba43171e08fc172c9d14ff78237249b87d5d8b69c16d5585a8629d31d33201562aef178cdafeca2a81c7c07006c9691ba2ecdea0ae6c6
7
+ data.tar.gz: 3bb7e18a53fe57848ec35babd9bec7654513726166d4803099a4e966849359594924552697dcb5645b56ed1e4eeda5b1a2e683947a3acf987a0ef625d76dbb20
@@ -4,15 +4,15 @@ module Nexmo
4
4
  def call(input)
5
5
  input.gsub(/[u{🔈}]\[(.+?)\]/) do
6
6
  audio = <<~HEREDOC
7
- <audio controls>
7
+ <audio preload="none" controls>
8
8
  <source src="#{$1}" type="audio/mpeg">
9
9
  </audio>
10
10
  HEREDOC
11
-
11
+
12
12
  "FREEZESTART#{Base64.urlsafe_encode64(audio)}FREEZEEND"
13
13
  end
14
14
  end
15
15
  end
16
-
16
+
17
17
  end
18
- end
18
+ end
@@ -5,7 +5,7 @@ module Nexmo
5
5
 
6
6
  def code_snippet_body(lexer, body, options = {})
7
7
  <<~HEREDOC
8
- <pre class="#{prism_css_classes(lexer)}" data-lang="#{code_language_to_prism(lexer.tag)}" data-section="code" data-block="#{options[:block]}"><code>#{body}</code></pre>
8
+ <pre class="#{prism_css_classes(lexer)}" data-lang="#{code_language_to_prism(lexer.tag)}" data-section="code" data-block="#{options[:block]}"><code>#{body.chomp}</code></pre>
9
9
  HEREDOC
10
10
  end
11
11
 
@@ -8,7 +8,6 @@ module Nexmo
8
8
  PhpInlinerFilter,
9
9
  InlineEscapeFilter,
10
10
  BlockEscapeFilter,
11
- ScreenshotFilter,
12
11
  AnchorFilter,
13
12
  AudioFilter,
14
13
  DynamicContentFilter,
data/lib/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # :nocov:
2
2
  module Nexmo
3
3
  module Markdown
4
- VERSION = '0.8.0'
4
+ VERSION = '0.9.2'
5
5
  end
6
6
  end
7
7
  # :nocov:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexmo_markdown_renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nexmo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-18 00:00:00.000000000 Z
11
+ date: 2022-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: banzai
@@ -275,7 +275,6 @@ files:
275
275
  - lib/nexmo_markdown_renderer/filters/partial_filter.rb
276
276
  - lib/nexmo_markdown_renderer/filters/php_inliner_filter.rb
277
277
  - lib/nexmo_markdown_renderer/filters/relative_link_filter.rb
278
- - lib/nexmo_markdown_renderer/filters/screenshot_filter.rb
279
278
  - lib/nexmo_markdown_renderer/filters/snippet_variables_filter.rb
280
279
  - lib/nexmo_markdown_renderer/filters/tab_filter.rb
281
280
  - lib/nexmo_markdown_renderer/filters/techio_filter.rb
@@ -1,22 +0,0 @@
1
- module Nexmo
2
- module Markdown
3
- class ScreenshotFilter < Banzai::Filter
4
- def call(input)
5
- input.gsub(/```screenshot(.+?)```/m) do |_s|
6
- config = YAML.safe_load($1)
7
- if config['image'] && File.file?("#{Nexmo::Markdown::Config.docs_base_path}/#{config['image']}")
8
- "![Screenshot](#{config['image'].gsub('public', '')})"
9
- else
10
- <<~HEREDOC
11
- ## Missing image
12
- To fix this run:
13
- ```
14
- $ rake screenshots:update
15
- ```
16
- HEREDOC
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end