html-pipeline-gitlab 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 16c862e917f7fbde5aabf6f048ee8c179b9a6bf2
4
- data.tar.gz: 04bcb6ff03651c19c7c0540381ef94e7e815929e
3
+ metadata.gz: d046ad012606bff4c5c2be4e47a231e3c1551839
4
+ data.tar.gz: f866aaff4853d2866f66d25443bf097c35cebf11
5
5
  SHA512:
6
- metadata.gz: ba74e5c489aa2e806155596e9c6cd2b20a7739108bdf0cd7e81bb44b06f2ca1f83411d5dd36f80358271b46e7ef13ffafe6379bd892e6915b1ea94895745ebec
7
- data.tar.gz: 8d84c411df83f861a3c3f975ebbf44b5dd5b5f4b4f1d3145e8be1885a5002be9e67feb63ad405c86198b4b2a3252ce6d7e9278864863abbbcca68f94dcfdb8b4
6
+ metadata.gz: 5e7551b541eded17cc626a4c9672b73d81b258c317a22f2633f67ea02ea3104fc789f595e7860cc2ba3afd006ccee4ea12145e634c09d5c9fe5b47b4d8a2c525
7
+ data.tar.gz: ad0f9936fe2c79c7ce614f47d04a804432130f518f0a70ae1a7c98aff4ccf9f902c6063018b28d7ac4564df1fcb7f376d2fbd64bbfff026fd000fb8aef1f3c18
@@ -10,12 +10,12 @@ module HTML
10
10
  #
11
11
  # Context:
12
12
  # :asset_root (required) - base url to link to emoji sprite
13
- # :asset_path (optional) - url path to link to emoji sprite.
14
- # :file_name can be used as a placeholder for the sprite file name.
13
+ # :asset_path (optional) - url path to link to emoji sprite.
14
+ # :file_name can be used as a placeholder for the sprite file name.
15
15
  # If no asset_path is set "emoji/:file_name" is used.
16
16
  class GitLabEmojiFilter < Filter
17
17
  def call
18
- doc.search('text()').each do |node|
18
+ search_text_nodes(doc).each do |node|
19
19
  content = node.to_html
20
20
  next if !content.include?(':')
21
21
  next if has_ancestor?(node, %w(pre code))
@@ -25,7 +25,7 @@ module HTML
25
25
  end
26
26
  doc
27
27
  end
28
-
28
+
29
29
  # Implementation of validate hook.
30
30
  # Errors should raise exceptions or use an existing validator.
31
31
  def validate
@@ -1,7 +1,7 @@
1
1
  module Html
2
2
  module Pipeline
3
3
  module Gitlab
4
- VERSION = '0.0.3'
4
+ VERSION = '0.0.4'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline-gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Schilling