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 +4 -4
- data/lib/html/pipeline/mrkdwn/mrkdwn_filter.rb +5 -5
- data/lib/html/pipeline/mrkdwn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a719d28f9a177bf2309038577b5fa5ca0fde8becbe75596bb6c802b836a92f00
|
4
|
+
data.tar.gz: 1a7233f84889b309b7e32517ff302327507c577c19dfd5b0a655dab73738fe75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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"
|
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
|
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
|
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", "@"]
|
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.
|
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-
|
11
|
+
date: 2024-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: escape_utils
|