html-pipeline-mrkdwn 0.1.8 → 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 +12 -12
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:
|
11
|
+
date: 2024-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: escape_utils
|
@@ -58,42 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: 2.5.22
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
68
|
+
version: 2.5.22
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '5.
|
75
|
+
version: '5.25'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '5.
|
82
|
+
version: '5.25'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: minitest-reporters
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
89
|
+
version: '1.7'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
96
|
+
version: '1.7'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '1.
|
117
|
+
version: '1.67'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '1.
|
124
|
+
version: '1.67'
|
125
125
|
description: An HTML::Pipeline filter for Slack's mrkdwn markup language.
|
126
126
|
email: jason.gorst@me.com
|
127
127
|
executables:
|
@@ -156,14 +156,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
156
|
requirements:
|
157
157
|
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 2.
|
159
|
+
version: 3.2.0
|
160
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
162
|
- - ">="
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
|
-
rubygems_version: 3.
|
166
|
+
rubygems_version: 3.5.22
|
167
167
|
signing_key:
|
168
168
|
specification_version: 4
|
169
169
|
summary: An HTML::Pipeline filter for Slack's mrkdwn markup language.
|