html-pipeline-mrkdwn 0.1.9 → 0.1.10

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: f2dfeab3c84eb8110568dc1a451d9ce63b8d3e8aa6f2c3b59196688e1dc8a594
4
- data.tar.gz: d90e5103e49125f9637cac6e50a86babdfc0164e5f9c3c75c2a28a46810ee6d0
3
+ metadata.gz: a719d28f9a177bf2309038577b5fa5ca0fde8becbe75596bb6c802b836a92f00
4
+ data.tar.gz: 1a7233f84889b309b7e32517ff302327507c577c19dfd5b0a655dab73738fe75
5
5
  SHA512:
6
- metadata.gz: 58923a44df98b0b10e5c1711364d56c9ace23120079f23b746bac061b607a1bf92a6eb2604bd4a1068b5a0e7598d4b013a302da08d5169676e5dcae233f034cd
7
- data.tar.gz: 7cafac882065e58eccaced03bcff7cbfeeb018b876b8c130d9570bf32a1be4e34730eb59dc4bd1dc8e4beb377e92832e64d90b95f7965409dbc0b6ca7cc35baf
6
+ metadata.gz: 5ebe821d1f8aa9216bf46b10d1c1bc91f09d5561131896f6eb60817e53949aa5c222aa84617b6f69653042d2f6ed046f408388b94f8f373c29b5a10e2fc93cc3
7
+ data.tar.gz: 7e4836e583e4f76a845a0c21bed986947242dcd2938db8446ae11d3af03b56eec9249992d23d7922a03076c05e1b005b7e1184c870bb4753fdfa0cacb47c35b9
@@ -33,7 +33,7 @@ module HTML
33
33
 
34
34
  LINE_BREAK_PATTERN = /\n/.freeze
35
35
 
36
- EMOJI_PATTERN = /:([\w+-]+):/.freeze
36
+ EMOJI_PATTERN = /:([\w+-_]+):/.freeze
37
37
 
38
38
  STYLE_PATTERN = /
39
39
  ([`*_~])
@@ -55,7 +55,7 @@ module HTML
55
55
  }.freeze
56
56
 
57
57
  def initialize(doc, context = nil, result = nil)
58
- super(doc, context, result)
58
+ super
59
59
 
60
60
  @emoji_image_tag = ->(emoji) { "<img src=\"#{emoji.image_filename}\" alt=\"#{emoji.name}\" class=\"emoji\">" }
61
61
  @slack_channels = {}
@@ -107,7 +107,7 @@ module HTML
107
107
  end
108
108
 
109
109
  def call_filter(filter_name, content)
110
- method = "#{filter_name}_filter".to_sym
110
+ method = :"#{filter_name}_filter"
111
111
  send method, content
112
112
  end
113
113
 
@@ -147,10 +147,10 @@ module HTML
147
147
  (text, klass, prefix) =
148
148
  case mention
149
149
  when /\A#(C.+)\Z/ # slack channels
150
- [@slack_channels.dig(Regexp.last_match[1]) || Regexp.last_match[1], "channel", "#"]
150
+ [@slack_channels[Regexp.last_match[1]] || Regexp.last_match[1], "channel", "#"]
151
151
 
152
152
  when /\A@([UB].+)\Z/ # slack users or bots
153
- [@slack_users.dig(Regexp.last_match[1]) || Regexp.last_match[1], "user", "@"]
153
+ [@slack_users[Regexp.last_match[1]] || Regexp.last_match[1], "user", "@"]
154
154
 
155
155
  when /\A!(here|channel|everyone)\Z/ # special mentions
156
156
  [Regexp.last_match[1], "mention", "@"]
@@ -5,7 +5,7 @@ require "html/pipeline"
5
5
  module HTML
6
6
  class Pipeline
7
7
  class Mrkdwn < Filter
8
- VERSION = "0.1.9"
8
+ VERSION = "0.1.10"
9
9
  end
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline-mrkdwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Gorst
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-27 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: escape_utils