qiita-markdown 0.39.0 → 0.41.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +43 -0
- data/.rubocop.yml +9 -3
- data/.rubocop_todo.yml +224 -36
- data/CHANGELOG.md +14 -0
- data/lib/qiita/markdown/filters/code_block.rb +2 -1
- data/lib/qiita/markdown/filters/group_mention.rb +1 -1
- data/lib/qiita/markdown/version.rb +1 -1
- data/qiita-markdown.gemspec +4 -3
- data/spec/qiita/markdown/processor_spec.rb +20 -0
- data/spec/spec_helper.rb +7 -2
- metadata +65 -9
- data/.travis.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2814dd1584a985b5aba7cb261d93b8ce30500911432143b3fd75eac4b64b30ee
|
4
|
+
data.tar.gz: 00e04020a944e3be12ec75f6865c4a578620799ae56e6eaa456021a529873549
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a1b124118e6f2c79169e757896a2099aed7239d3f029083ba7acf08c8b91f9352f54f79e5d16f737d160639660461ec1f764f4dbb2dc4b846f91736b87962cc
|
7
|
+
data.tar.gz: 58e0fa409e266d22bdc5416404870d2fcaa9851aa665fd27c051f88c0663a7baef8f1da24a8e6c11e8f6a03a6dcd67211f64673ea259cd2e48e58c0e4b719459
|
@@ -0,0 +1,43 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
push:
|
6
|
+
branches:
|
7
|
+
- master
|
8
|
+
workflow_dispatch:
|
9
|
+
|
10
|
+
permissions:
|
11
|
+
contents: read
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
test:
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
os: ['ubuntu-18.04', 'ubuntu-latest', 'macos-latest']
|
19
|
+
ruby: ['2.6', '2.7']
|
20
|
+
experimental: [false]
|
21
|
+
include:
|
22
|
+
- os: 'ubuntu-latest'
|
23
|
+
ruby: 'head'
|
24
|
+
experimental: true
|
25
|
+
runs-on: ${{ matrix.os }}
|
26
|
+
continue-on-error: ${{ matrix.experimental }}
|
27
|
+
steps:
|
28
|
+
- name: Get branch names
|
29
|
+
id: branch-name
|
30
|
+
uses: tj-actions/branch-names@v4.9
|
31
|
+
- uses: actions/checkout@v2
|
32
|
+
- uses: ruby/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
ruby-version: ${{ matrix.ruby }}
|
35
|
+
bundler-cache: true
|
36
|
+
- name: Test & publish code coverage
|
37
|
+
uses: paambaati/codeclimate-action@v2.7.5
|
38
|
+
env:
|
39
|
+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
40
|
+
GIT_BRANCH: ${{ steps.branch-name.outputs.current_branch }}
|
41
|
+
GIT_COMMIT_SHA: ${{ github.sha }}
|
42
|
+
with:
|
43
|
+
coverageCommand: bundle exec rake
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
|
3
|
+
AllCops:
|
4
|
+
NewCops: enable
|
5
|
+
|
3
6
|
Metrics/ClassLength:
|
4
7
|
Enabled: false
|
5
8
|
|
@@ -17,7 +20,7 @@ Style/GuardClause:
|
|
17
20
|
Enabled: false
|
18
21
|
|
19
22
|
Style/PredicateName:
|
20
|
-
|
23
|
+
ForbiddenPrefixes:
|
21
24
|
- is_
|
22
25
|
|
23
26
|
Style/StringLiterals:
|
@@ -26,10 +29,13 @@ Style/StringLiterals:
|
|
26
29
|
Style/TrailingCommaInArguments:
|
27
30
|
EnforcedStyleForMultiline: comma
|
28
31
|
|
29
|
-
Style/
|
32
|
+
Style/TrailingCommaInHashLiteral:
|
33
|
+
EnforcedStyleForMultiline: comma
|
34
|
+
|
35
|
+
Style/TrailingCommaInArrayLiteral:
|
30
36
|
EnforcedStyleForMultiline: comma
|
31
37
|
|
32
|
-
Style/
|
38
|
+
Style/RedundantPercentQ:
|
33
39
|
Enabled: false
|
34
40
|
|
35
41
|
Metrics/LineLength:
|
data/.rubocop_todo.yml
CHANGED
@@ -1,85 +1,233 @@
|
|
1
1
|
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
2
|
+
# `rubocop --auto-gen-config --exclude-limit 99999`
|
3
|
+
# on 2022-03-29 10:59:09 UTC using RuboCop version 1.7.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 3
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
12
|
+
# Include: **/*.gemspec
|
13
|
+
Gemspec/OrderedDependencies:
|
14
|
+
Exclude:
|
15
|
+
- 'qiita-markdown.gemspec'
|
16
|
+
|
17
|
+
# Offense count: 1
|
18
|
+
# Cop supports --auto-correct.
|
19
|
+
Layout/ClosingHeredocIndentation:
|
20
|
+
Exclude:
|
21
|
+
- 'spec/qiita/markdown/processor_spec.rb'
|
22
|
+
|
23
|
+
# Offense count: 9
|
24
|
+
# Cop supports --auto-correct.
|
25
|
+
Layout/EmptyLineAfterGuardClause:
|
26
|
+
Exclude:
|
27
|
+
- 'lib/qiita/markdown/filters/custom_block.rb'
|
28
|
+
- 'lib/qiita/markdown/filters/external_link.rb'
|
29
|
+
- 'lib/qiita/markdown/filters/footnote.rb'
|
30
|
+
- 'lib/qiita/markdown/filters/mention.rb'
|
31
|
+
- 'lib/qiita/markdown/filters/simplify.rb'
|
32
|
+
- 'lib/qiita/markdown/transformers/filter_attributes.rb'
|
33
|
+
|
34
|
+
# Offense count: 22
|
35
|
+
# Cop supports --auto-correct.
|
36
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
37
|
+
# SupportedHashRocketStyles: key, separator, table
|
38
|
+
# SupportedColonStyles: key, separator, table
|
39
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
40
|
+
Layout/HashAlignment:
|
41
|
+
Exclude:
|
42
|
+
- 'lib/qiita/markdown/filters/user_input_sanitizer.rb'
|
43
|
+
|
44
|
+
# Offense count: 1
|
45
|
+
# Cop supports --auto-correct.
|
46
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
|
47
|
+
# SupportedStyles: space, no_space, compact
|
48
|
+
# SupportedStylesForEmptyBrackets: space, no_space
|
49
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
50
|
+
Exclude:
|
51
|
+
- 'lib/qiita/markdown/transformers/filter_iframe.rb'
|
52
|
+
|
53
|
+
# Offense count: 5
|
54
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
10
55
|
Metrics/AbcSize:
|
11
|
-
Max:
|
56
|
+
Max: 22
|
12
57
|
|
13
|
-
# Offense count:
|
14
|
-
# Configuration parameters: CountComments.
|
58
|
+
# Offense count: 10
|
59
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
15
60
|
Metrics/MethodLength:
|
16
61
|
Max: 20
|
17
62
|
|
18
63
|
# Offense count: 1
|
19
|
-
|
20
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
21
|
-
# SupportedStyles: always, conditionals
|
22
|
-
Style/AndOr:
|
64
|
+
Naming/ConstantName:
|
23
65
|
Exclude:
|
24
|
-
- 'lib/qiita/markdown/filters/
|
66
|
+
- 'lib/qiita/markdown/filters/mention.rb'
|
67
|
+
|
68
|
+
# Offense count: 1
|
69
|
+
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
70
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
71
|
+
Naming/FileName:
|
72
|
+
Exclude:
|
73
|
+
- 'lib/qiita-markdown.rb'
|
74
|
+
|
75
|
+
# Offense count: 33
|
76
|
+
# Configuration parameters: ForbiddenDelimiters.
|
77
|
+
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
78
|
+
Naming/HeredocDelimiterNaming:
|
79
|
+
Exclude:
|
80
|
+
- 'spec/qiita/markdown/greenmat/html_toc_renderer_spec.rb'
|
81
|
+
- 'spec/qiita/markdown/summary_processor_spec.rb'
|
82
|
+
|
83
|
+
# Offense count: 3
|
84
|
+
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
85
|
+
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
86
|
+
Naming/MemoizedInstanceVariableName:
|
87
|
+
Exclude:
|
88
|
+
- 'benchmark/heading_anchor_rendering.rb'
|
89
|
+
- 'lib/qiita/markdown/filters/greenmat.rb'
|
90
|
+
- 'lib/qiita/markdown/greenmat/heading_rendering.rb'
|
91
|
+
|
92
|
+
# Offense count: 1
|
93
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
94
|
+
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
|
95
|
+
Naming/MethodParameterName:
|
96
|
+
Exclude:
|
97
|
+
- 'lib/qiita/markdown/filters/footnote.rb'
|
25
98
|
|
26
99
|
# Offense count: 3
|
27
100
|
# Cop supports --auto-correct.
|
28
|
-
# Configuration parameters: EnforcedStyle
|
101
|
+
# Configuration parameters: EnforcedStyle.
|
29
102
|
# SupportedStyles: percent_q, bare_percent
|
30
103
|
Style/BarePercentLiterals:
|
31
104
|
Exclude:
|
32
105
|
- 'lib/qiita/markdown/filters/syntax_highlight.rb'
|
33
106
|
|
34
107
|
# Offense count: 1
|
35
|
-
|
108
|
+
# Cop supports --auto-correct.
|
109
|
+
Style/ExpandPathArguments:
|
36
110
|
Exclude:
|
37
|
-
- '
|
111
|
+
- 'qiita-markdown.gemspec'
|
38
112
|
|
39
|
-
# Offense count:
|
40
|
-
|
113
|
+
# Offense count: 47
|
114
|
+
# Cop supports --auto-correct.
|
115
|
+
# Configuration parameters: EnforcedStyle.
|
116
|
+
# SupportedStyles: always, always_true, never
|
117
|
+
Style/FrozenStringLiteralComment:
|
41
118
|
Exclude:
|
119
|
+
- 'Gemfile'
|
120
|
+
- 'Rakefile'
|
42
121
|
- 'benchmark/heading_anchor_rendering.rb'
|
122
|
+
- 'lib/qiita-markdown.rb'
|
123
|
+
- 'lib/qiita/markdown.rb'
|
124
|
+
- 'lib/qiita/markdown/base_processor.rb'
|
125
|
+
- 'lib/qiita/markdown/embed/asciinema.rb'
|
126
|
+
- 'lib/qiita/markdown/embed/code_pen.rb'
|
127
|
+
- 'lib/qiita/markdown/embed/google_slide.rb'
|
128
|
+
- 'lib/qiita/markdown/embed/slide_share.rb'
|
129
|
+
- 'lib/qiita/markdown/embed/speeker_deck.rb'
|
130
|
+
- 'lib/qiita/markdown/embed/tweet.rb'
|
131
|
+
- 'lib/qiita/markdown/embed/youtube.rb'
|
43
132
|
- 'lib/qiita/markdown/filters/checkbox.rb'
|
133
|
+
- 'lib/qiita/markdown/filters/code_block.rb'
|
134
|
+
- 'lib/qiita/markdown/filters/custom_block.rb'
|
135
|
+
- 'lib/qiita/markdown/filters/emoji.rb'
|
136
|
+
- 'lib/qiita/markdown/filters/external_link.rb'
|
137
|
+
- 'lib/qiita/markdown/filters/final_sanitizer.rb'
|
138
|
+
- 'lib/qiita/markdown/filters/footnote.rb'
|
139
|
+
- 'lib/qiita/markdown/filters/greenmat.rb'
|
140
|
+
- 'lib/qiita/markdown/filters/group_mention.rb'
|
141
|
+
- 'lib/qiita/markdown/filters/image_link.rb'
|
142
|
+
- 'lib/qiita/markdown/filters/inline_code_color.rb'
|
143
|
+
- 'lib/qiita/markdown/filters/mention.rb'
|
144
|
+
- 'lib/qiita/markdown/filters/simplify.rb'
|
145
|
+
- 'lib/qiita/markdown/filters/syntax_highlight.rb'
|
146
|
+
- 'lib/qiita/markdown/filters/toc.rb'
|
147
|
+
- 'lib/qiita/markdown/filters/truncate.rb'
|
148
|
+
- 'lib/qiita/markdown/filters/user_input_sanitizer.rb'
|
149
|
+
- 'lib/qiita/markdown/greenmat/heading_rendering.rb'
|
150
|
+
- 'lib/qiita/markdown/greenmat/html_renderer.rb'
|
151
|
+
- 'lib/qiita/markdown/greenmat/html_toc_renderer.rb'
|
152
|
+
- 'lib/qiita/markdown/processor.rb'
|
153
|
+
- 'lib/qiita/markdown/summary_processor.rb'
|
154
|
+
- 'lib/qiita/markdown/transformers/filter_attributes.rb'
|
155
|
+
- 'lib/qiita/markdown/transformers/filter_iframe.rb'
|
156
|
+
- 'lib/qiita/markdown/transformers/filter_script.rb'
|
157
|
+
- 'lib/qiita/markdown/transformers/strip_invalid_node.rb'
|
158
|
+
- 'lib/qiita/markdown/version.rb'
|
159
|
+
- 'qiita-markdown.gemspec'
|
160
|
+
- 'spec/qiita/markdown/filters/greenmat_spec.rb'
|
161
|
+
- 'spec/qiita/markdown/filters/inline_code_color_spec.rb'
|
162
|
+
- 'spec/qiita/markdown/greenmat/html_toc_renderer_spec.rb'
|
163
|
+
- 'spec/qiita/markdown/processor_spec.rb'
|
164
|
+
- 'spec/qiita/markdown/summary_processor_spec.rb'
|
165
|
+
- 'spec/spec_helper.rb'
|
44
166
|
|
45
|
-
# Offense count:
|
46
|
-
#
|
47
|
-
Style/
|
167
|
+
# Offense count: 2
|
168
|
+
# Cop supports --auto-correct.
|
169
|
+
Style/IfUnlessModifier:
|
48
170
|
Exclude:
|
49
|
-
- 'lib/qiita
|
171
|
+
- 'lib/qiita/markdown/filters/truncate.rb'
|
172
|
+
- 'lib/qiita/markdown/transformers/strip_invalid_node.rb'
|
50
173
|
|
51
|
-
# Offense count:
|
174
|
+
# Offense count: 17
|
52
175
|
# Cop supports --auto-correct.
|
176
|
+
# Configuration parameters: EnforcedStyle.
|
177
|
+
# SupportedStyles: literals, strict
|
53
178
|
Style/MutableConstant:
|
54
179
|
Exclude:
|
55
180
|
- 'lib/qiita/markdown/embed/code_pen.rb'
|
56
181
|
- 'lib/qiita/markdown/embed/tweet.rb'
|
57
182
|
- 'lib/qiita/markdown/filters/checkbox.rb'
|
58
183
|
- 'lib/qiita/markdown/filters/code_block.rb'
|
59
|
-
- 'lib/qiita/markdown/filters/
|
184
|
+
- 'lib/qiita/markdown/filters/group_mention.rb'
|
185
|
+
- 'lib/qiita/markdown/filters/inline_code_color.rb'
|
186
|
+
- 'lib/qiita/markdown/filters/mention.rb'
|
60
187
|
- 'lib/qiita/markdown/filters/simplify.rb'
|
61
188
|
- 'lib/qiita/markdown/filters/syntax_highlight.rb'
|
62
|
-
- 'lib/qiita/markdown/processor.rb'
|
63
|
-
- 'lib/qiita/markdown/summary_processor.rb'
|
64
189
|
- 'lib/qiita/markdown/version.rb'
|
65
190
|
|
66
191
|
# Offense count: 2
|
67
192
|
# Cop supports --auto-correct.
|
68
|
-
# Configuration parameters: EnforcedStyle, MinBodyLength
|
193
|
+
# Configuration parameters: EnforcedStyle, MinBodyLength.
|
69
194
|
# SupportedStyles: skip_modifier_ifs, always
|
70
195
|
Style/Next:
|
71
196
|
Exclude:
|
72
197
|
- 'lib/qiita/markdown/filters/code_block.rb'
|
73
198
|
- 'lib/qiita/markdown/filters/image_link.rb'
|
74
199
|
|
75
|
-
# Offense count:
|
200
|
+
# Offense count: 5
|
201
|
+
# Cop supports --auto-correct.
|
202
|
+
# Configuration parameters: EnforcedStyle, IgnoredMethods.
|
203
|
+
# SupportedStyles: predicate, comparison
|
204
|
+
Style/NumericPredicate:
|
205
|
+
Exclude:
|
206
|
+
- 'spec/**/*'
|
207
|
+
- 'benchmark/heading_anchor_rendering.rb'
|
208
|
+
- 'lib/qiita/markdown/greenmat/heading_rendering.rb'
|
209
|
+
- 'lib/qiita/markdown/greenmat/html_toc_renderer.rb'
|
210
|
+
|
211
|
+
# Offense count: 1
|
212
|
+
# Configuration parameters: AllowedMethods.
|
213
|
+
# AllowedMethods: respond_to_missing?
|
214
|
+
Style/OptionalBooleanParameter:
|
215
|
+
Exclude:
|
216
|
+
- 'lib/qiita/markdown/greenmat/heading_rendering.rb'
|
217
|
+
|
218
|
+
# Offense count: 1
|
219
|
+
# Cop supports --auto-correct.
|
220
|
+
Style/OrAssignment:
|
221
|
+
Exclude:
|
222
|
+
- 'lib/qiita/markdown/greenmat/html_toc_renderer.rb'
|
223
|
+
|
224
|
+
# Offense count: 9
|
76
225
|
# Cop supports --auto-correct.
|
77
226
|
# Configuration parameters: PreferredDelimiters.
|
78
227
|
Style/PercentLiteralDelimiters:
|
79
228
|
Exclude:
|
80
229
|
- 'benchmark/heading_anchor_rendering.rb'
|
81
230
|
- 'lib/qiita/markdown/filters/mention.rb'
|
82
|
-
- 'lib/qiita/markdown/filters/sanitize.rb'
|
83
231
|
- 'lib/qiita/markdown/filters/syntax_highlight.rb'
|
84
232
|
- 'spec/qiita/markdown/processor_spec.rb'
|
85
233
|
- 'spec/qiita/markdown/summary_processor_spec.rb'
|
@@ -92,34 +240,74 @@ Style/PerlBackrefs:
|
|
92
240
|
|
93
241
|
# Offense count: 1
|
94
242
|
# Cop supports --auto-correct.
|
95
|
-
# Configuration parameters:
|
243
|
+
# Configuration parameters: Methods.
|
244
|
+
Style/RedundantArgument:
|
245
|
+
Exclude:
|
246
|
+
- 'lib/qiita/markdown/filters/custom_block.rb'
|
247
|
+
|
248
|
+
# Offense count: 1
|
249
|
+
# Cop supports --auto-correct.
|
250
|
+
Style/RedundantRegexpCharacterClass:
|
251
|
+
Exclude:
|
252
|
+
- 'lib/qiita/markdown/filters/mention.rb'
|
253
|
+
|
254
|
+
# Offense count: 9
|
255
|
+
# Cop supports --auto-correct.
|
256
|
+
Style/RedundantRegexpEscape:
|
257
|
+
Exclude:
|
258
|
+
- 'lib/qiita/markdown/filters/group_mention.rb'
|
259
|
+
- 'lib/qiita/markdown/filters/inline_code_color.rb'
|
260
|
+
|
261
|
+
# Offense count: 4
|
262
|
+
# Cop supports --auto-correct.
|
263
|
+
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
96
264
|
# SupportedStyles: slashes, percent_r, mixed
|
97
265
|
Style/RegexpLiteral:
|
98
266
|
Exclude:
|
99
|
-
- 'lib/qiita/markdown/filters/mention.rb'
|
100
267
|
- 'lib/qiita/markdown/filters/inline_code_color.rb'
|
268
|
+
- 'lib/qiita/markdown/filters/mention.rb'
|
269
|
+
|
270
|
+
# Offense count: 1
|
271
|
+
# Cop supports --auto-correct.
|
272
|
+
# Configuration parameters: EnforcedStyle.
|
273
|
+
# SupportedStyles: implicit, explicit
|
274
|
+
Style/RescueStandardError:
|
275
|
+
Exclude:
|
276
|
+
- 'lib/qiita/markdown/filters/syntax_highlight.rb'
|
277
|
+
|
278
|
+
# Offense count: 2
|
279
|
+
# Cop supports --auto-correct.
|
280
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
|
281
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
282
|
+
Style/SafeNavigation:
|
283
|
+
Exclude:
|
284
|
+
- 'lib/qiita/markdown/filters/custom_block.rb'
|
285
|
+
- 'lib/qiita/markdown/filters/toc.rb'
|
101
286
|
|
102
287
|
# Offense count: 3
|
103
288
|
# Cop supports --auto-correct.
|
104
|
-
# Configuration parameters: EnforcedStyle
|
289
|
+
# Configuration parameters: EnforcedStyle.
|
105
290
|
# SupportedStyles: only_raise, only_fail, semantic
|
106
291
|
Style/SignalException:
|
107
292
|
Exclude:
|
108
293
|
- 'lib/qiita/markdown/greenmat/heading_rendering.rb'
|
109
294
|
- 'spec/qiita/markdown/summary_processor_spec.rb'
|
110
295
|
|
111
|
-
# Offense count:
|
296
|
+
# Offense count: 13
|
112
297
|
# Cop supports --auto-correct.
|
113
|
-
# Configuration parameters: EnforcedStyleForMultiline
|
114
|
-
#
|
298
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
299
|
+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
115
300
|
Style/TrailingCommaInArguments:
|
116
301
|
Exclude:
|
117
302
|
- 'lib/qiita/markdown/filters/mention.rb'
|
118
303
|
- 'spec/qiita/markdown/processor_spec.rb'
|
119
304
|
|
120
|
-
# Offense count:
|
305
|
+
# Offense count: 12
|
121
306
|
# Cop supports --auto-correct.
|
122
|
-
# Configuration parameters: EnforcedStyle,
|
307
|
+
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
|
123
308
|
# SupportedStyles: percent, brackets
|
124
309
|
Style/WordArray:
|
125
|
-
|
310
|
+
Exclude:
|
311
|
+
- 'lib/qiita/markdown/filters/final_sanitizer.rb'
|
312
|
+
- 'lib/qiita/markdown/transformers/filter_script.rb'
|
313
|
+
- 'spec/qiita/markdown/processor_spec.rb'
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
## 0.41.0
|
4
|
+
|
5
|
+
- Bump greenmat from 3.5.1.2 to 3.5.1.3
|
6
|
+
- Dropping Ruby 2.5 support (#107)
|
7
|
+
- Bump rubocop from 0.40.0 to 1.7.0
|
8
|
+
|
9
|
+
## 0.40.1
|
10
|
+
|
11
|
+
- Fix to support file names containing colons.
|
12
|
+
|
13
|
+
## 0.40.0
|
14
|
+
- Change ci platform to Github Actions.
|
15
|
+
- Fix regular expressions to detect group id(url_name) for group mention.
|
16
|
+
|
3
17
|
## 0.39.0
|
4
18
|
- Fix an error when custom block type is empty
|
5
19
|
|
data/qiita-markdown.gemspec
CHANGED
@@ -16,22 +16,23 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
-
spec.required_ruby_version = ">= 2.
|
19
|
+
spec.required_ruby_version = ">= 2.6.0"
|
20
20
|
|
21
21
|
spec.add_dependency "gemoji"
|
22
22
|
spec.add_dependency "github-linguist", "~> 4.0"
|
23
23
|
spec.add_dependency "html-pipeline", "~> 2.0"
|
24
24
|
spec.add_dependency "mem"
|
25
25
|
spec.add_dependency "rouge", "3.26.0"
|
26
|
-
spec.add_dependency "greenmat", "3.5.1.
|
26
|
+
spec.add_dependency "greenmat", "3.5.1.3"
|
27
27
|
spec.add_dependency "sanitize"
|
28
28
|
spec.add_dependency "addressable"
|
29
29
|
spec.add_development_dependency "activesupport", "4.2.6"
|
30
30
|
spec.add_development_dependency "benchmark-ips", "~> 1.2"
|
31
31
|
spec.add_development_dependency "bundler"
|
32
32
|
spec.add_development_dependency "codeclimate-test-reporter", "0.4.4"
|
33
|
+
spec.add_development_dependency "simplecov", "!= 0.18.0", "!= 0.18.1", "!= 0.18.2", "!= 0.18.3", "!= 0.18.4", "!= 0.18.5", "!= 0.19.0", "!= 0.19.1"
|
33
34
|
spec.add_development_dependency "pry"
|
34
35
|
spec.add_development_dependency "rake", "~> 10.0"
|
35
36
|
spec.add_development_dependency "rspec", "~> 3.1"
|
36
|
-
spec.add_development_dependency "rubocop", "
|
37
|
+
spec.add_development_dependency "rubocop", "1.7.0"
|
37
38
|
end
|
@@ -156,6 +156,26 @@ describe Qiita::Markdown::Processor do
|
|
156
156
|
end
|
157
157
|
end
|
158
158
|
|
159
|
+
context "with code & filename with `:`" do
|
160
|
+
let(:markdown) do
|
161
|
+
<<-MARKDOWN.strip_heredoc
|
162
|
+
```ruby:test:example.rb
|
163
|
+
1
|
164
|
+
```
|
165
|
+
MARKDOWN
|
166
|
+
end
|
167
|
+
|
168
|
+
it "returns code-frame, code-lang, and highlighted pre element" do
|
169
|
+
should eq <<-HTML.strip_heredoc
|
170
|
+
<div class="code-frame" data-lang="ruby">
|
171
|
+
<div class="code-lang"><span class="bold">test:example.rb</span></div>
|
172
|
+
<div class="highlight"><pre class="codehilite"><code><span class="mi">1</span>
|
173
|
+
</code></pre></div>
|
174
|
+
</div>
|
175
|
+
HTML
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
159
179
|
context "with code & filename with .php" do
|
160
180
|
let(:markdown) do
|
161
181
|
<<-MARKDOWN.strip_heredoc
|
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
if ENV["CI"]
|
2
|
-
|
3
|
-
|
2
|
+
if ENV["GITHUB_ACTIONS"]
|
3
|
+
require "simplecov"
|
4
|
+
SimpleCov.start
|
5
|
+
else
|
6
|
+
require "codeclimate-test-reporter"
|
7
|
+
CodeClimate::TestReporter.start
|
8
|
+
end
|
4
9
|
end
|
5
10
|
|
6
11
|
require "qiita-markdown"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qiita-markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.41.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gemoji
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 3.5.1.
|
89
|
+
version: 3.5.1.3
|
90
90
|
type: :runtime
|
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: 3.5.1.
|
96
|
+
version: 3.5.1.3
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: sanitize
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,6 +178,62 @@ dependencies:
|
|
178
178
|
- - '='
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 0.4.4
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: simplecov
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "!="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 0.18.0
|
188
|
+
- - "!="
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
version: 0.18.1
|
191
|
+
- - "!="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: 0.18.2
|
194
|
+
- - "!="
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: 0.18.3
|
197
|
+
- - "!="
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: 0.18.4
|
200
|
+
- - "!="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: 0.18.5
|
203
|
+
- - "!="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: 0.19.0
|
206
|
+
- - "!="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 0.19.1
|
209
|
+
type: :development
|
210
|
+
prerelease: false
|
211
|
+
version_requirements: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "!="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: 0.18.0
|
216
|
+
- - "!="
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: 0.18.1
|
219
|
+
- - "!="
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: 0.18.2
|
222
|
+
- - "!="
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: 0.18.3
|
225
|
+
- - "!="
|
226
|
+
- !ruby/object:Gem::Version
|
227
|
+
version: 0.18.4
|
228
|
+
- - "!="
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: 0.18.5
|
231
|
+
- - "!="
|
232
|
+
- !ruby/object:Gem::Version
|
233
|
+
version: 0.19.0
|
234
|
+
- - "!="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: 0.19.1
|
181
237
|
- !ruby/object:Gem::Dependency
|
182
238
|
name: pry
|
183
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,14 +282,14 @@ dependencies:
|
|
226
282
|
requirements:
|
227
283
|
- - '='
|
228
284
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
285
|
+
version: 1.7.0
|
230
286
|
type: :development
|
231
287
|
prerelease: false
|
232
288
|
version_requirements: !ruby/object:Gem::Requirement
|
233
289
|
requirements:
|
234
290
|
- - '='
|
235
291
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
292
|
+
version: 1.7.0
|
237
293
|
description:
|
238
294
|
email:
|
239
295
|
- r7kamura@gmail.com
|
@@ -241,11 +297,11 @@ executables: []
|
|
241
297
|
extensions: []
|
242
298
|
extra_rdoc_files: []
|
243
299
|
files:
|
300
|
+
- ".github/workflows/test.yml"
|
244
301
|
- ".gitignore"
|
245
302
|
- ".rspec"
|
246
303
|
- ".rubocop.yml"
|
247
304
|
- ".rubocop_todo.yml"
|
248
|
-
- ".travis.yml"
|
249
305
|
- CHANGELOG.md
|
250
306
|
- Gemfile
|
251
307
|
- LICENSE.txt
|
@@ -309,14 +365,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
309
365
|
requirements:
|
310
366
|
- - ">="
|
311
367
|
- !ruby/object:Gem::Version
|
312
|
-
version: 2.
|
368
|
+
version: 2.6.0
|
313
369
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
314
370
|
requirements:
|
315
371
|
- - ">="
|
316
372
|
- !ruby/object:Gem::Version
|
317
373
|
version: '0'
|
318
374
|
requirements: []
|
319
|
-
rubygems_version: 3.1
|
375
|
+
rubygems_version: 3.0.3.1
|
320
376
|
signing_key:
|
321
377
|
specification_version: 4
|
322
378
|
summary: Qiita-specified markdown processor.
|
data/.travis.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
addons:
|
3
|
-
apt:
|
4
|
-
packages:
|
5
|
-
- libicu-dev
|
6
|
-
before_install:
|
7
|
-
- gem update bundler
|
8
|
-
language: ruby
|
9
|
-
rvm:
|
10
|
-
- 2.2
|
11
|
-
- 2.3
|
12
|
-
- 2.4
|
13
|
-
env:
|
14
|
-
global:
|
15
|
-
secure: n8eyxYYfxLApgR4YGKqbrOgGlraIyLyoql4K4DvLZV4kqfGf9LLsPdP7Shudqrv5k2h8xIwnJVnwcPZx9YCu5WWYrJd7vmivpU2j52LwFPYRM+GFNcu7TXmzcNSPG8agnc5We9amF5zJY6XSTpzWpxyqfIwEZM75iR6XXuHuLFk=
|
16
|
-
cache: bundler
|