nexmo_markdown_renderer 0.7.1 → 0.7.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: 667e3ba4a5588d4ae37789765a14a2e0128a80518bd698985ca0782f53e0b5db
4
- data.tar.gz: 1c9ded00f8c04e6eb4f6d1a3289f8028f1d008de5b373a6ee4aad52813a74aa7
3
+ metadata.gz: dd02562cf6db0de1c58951324ee7be71aeee914ea5bee6498ec12af45b78465e
4
+ data.tar.gz: 2a6ad3f742f90d3714c7a864d8f8a44060f6929ef824bb270251da45882b99b0
5
5
  SHA512:
6
- metadata.gz: 59839bd637e03586cd4e2d099dcad44e12784cbd3959175348fce0f0a3435c986b32e6396fccf200fc6b4ef28cac4cabe2ef7fda6f41bc1555f2163a81d903e9
7
- data.tar.gz: 0e7378afc7bf66953d4b81bc9e822c0e161cac787f368397bd6ec77be72158c0d47d8047b3a850e21cd77051e0b2978c989492e54f8e3ab1ac390f7d2e2874c5
6
+ metadata.gz: 27b07ba6eebeb8023e0f541a8b99b4790935df5f45e79b691dc419c3f2f86019cdfa50212f0854d2eebec2a7a59d60f7739eb4c860994462b01943cc6be2834c
7
+ data.tar.gz: a6db2da85020d5661a24f1a33f7bd2217b2475e76d78c320b8eaadd87e066df6d5d3954d0a90d4a3bcf6e21087a1bc21714952a88c1bfa14f3f0cb93d3ab64be
@@ -1,10 +1,10 @@
1
- module Nexmo
1
+ module Nexmo
2
2
  module Markdown
3
3
  module I18n
4
4
  module Smartling
5
5
  class FrontmatterFilter < Banzai::Filter
6
6
  def call(input)
7
- input.gsub(/\A\*\*\* \*\* \* \*\* \*\*\*\n*(.*\n)!?(----+|\*\*\* \*\* \* \*\* \*\*\*)\n*/m) do |_frontmatter|
7
+ input.gsub(/\A\*\*\* \*\* \* \*\* \*\*\*\n*(.*?\n)!?(\*\*\* \*\* \* \*\* \*\*\*|----+)\n*/m) do |_frontmatter|
8
8
  front = $1.gsub(/`products: (.*)`\n\n/) do |products|
9
9
  "products: #{$1}\n\n"
10
10
  end
@@ -6,8 +6,7 @@ module Nexmo
6
6
  def initialize(_options = {})
7
7
  super(
8
8
  I18n::Smartling::FrontmatterFilter,
9
- I18n::Smartling::EscapeFilter,
10
- I18n::Smartling::CodeBlockFilter
9
+ I18n::Smartling::EscapeFilter
11
10
  )
12
11
  end
13
12
  end
@@ -1,7 +1,7 @@
1
1
  # :nocov:
2
2
  module Nexmo
3
3
  module Markdown
4
- VERSION = '0.7.1'
4
+ VERSION = '0.7.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.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nexmo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-30 00:00:00.000000000 Z
11
+ date: 2020-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: banzai
@@ -260,7 +260,6 @@ files:
260
260
  - lib/nexmo_markdown_renderer/filters/frontmatter_filter.rb
261
261
  - lib/nexmo_markdown_renderer/filters/heading_filter.rb
262
262
  - lib/nexmo_markdown_renderer/filters/i18n/frontmatter_filter.rb
263
- - lib/nexmo_markdown_renderer/filters/i18n/smartling/code_block_filter.rb
264
263
  - lib/nexmo_markdown_renderer/filters/i18n/smartling/escape_filter.rb
265
264
  - lib/nexmo_markdown_renderer/filters/i18n/smartling/frontmatter_filter.rb
266
265
  - lib/nexmo_markdown_renderer/filters/icon_filter.rb
@@ -1,20 +0,0 @@
1
- module Nexmo
2
- module Markdown
3
- module I18n
4
- module Smartling
5
- class CodeBlockFilter < Banzai::Filter
6
- def call(input)
7
- input.gsub(/\n\n\s{4}(.*?)\n\n/m) do
8
- <<~CODE_BLOCK
9
-
10
- ````
11
- #{$1.split(/\n\s{4}/).join("\n")}
12
- ````
13
- CODE_BLOCK
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
20
- end