qiita-markdown 0.16.0 → 0.16.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of qiita-markdown might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 739494b992f30301e63c329ca71f822ef80bd67a
4
- data.tar.gz: 6f925bef2e51205cec9f663e71ddae50ef6d2097
3
+ metadata.gz: 01b805ffe8201bb8805e335ef00b5a2b08164115
4
+ data.tar.gz: 15a749e779263c51422f416cd4f03927131628dd
5
5
  SHA512:
6
- metadata.gz: f002a9b803ff192b9139c8060dde2116e945aec2aec1fd9f02e3a09d45ad85c5654a7fdf8f2f7b31bd44a9f48293c693506d4b0cbeca15c9d41a2d4ae66cadf9
7
- data.tar.gz: b718ef753796afa29aaed9dc72122a0bc88daa33db71cceea242ffe8192ff4f6238766e54ebe0f91821ebff7680b231457ce200ff7f6a0f3c38bb2936192d4af
6
+ metadata.gz: 53275947310ee3fc879b5ed2934ec68f30d9f2a7b3a0cac3cf83358337bf490902168454d4d70979aacce9993ce16ebb9ed835dc5cbf22420a84d726afde9c11
7
+ data.tar.gz: eaf5964c573eb43bd0b9ec008a67df6d5a9c29edb0b8a959f2c54372a6f8243f6e097785de040c43ba1a4cef18e7ccccf037239b2766e5054f70eb38d85ddf27
data/CHANGELOG.md CHANGED
@@ -1,139 +1,188 @@
1
+ ## 0.16.1
2
+
3
+ - Fix a group mention bug that unexpectedly removes preceding space
4
+
1
5
  ## 0.16.0
6
+
2
7
  - Add rel=noopener to all external a tags
3
8
  - Support HTML5 `<details>` and `<summary>` elements
4
9
  - Enable to change settings for footnotes
5
10
 
6
11
  ## 0.15.0
12
+
7
13
  - Append `rel=nofollow` and `target=_blank` to `a` tags for external link
8
14
 
9
15
  ## 0.14.0
16
+
10
17
  - Add some attributes to mentions for rendering hovercard
11
18
 
12
19
  ## 0.13.0
20
+
13
21
  - Support group mention
14
22
 
15
23
  ## 0.12.0
24
+
16
25
  - Add custom emoji support via `:emoji_names` and `:emoji_url_generator` contexts
17
26
 
18
27
  ## 0.11.5
28
+
19
29
  - Add a leading newline to `<pre>` elements so that leading newlines inputted by user are properly rendered on browsers
20
30
 
21
31
  ## 0.11.4
32
+
22
33
  - Avoid stripping leading and trailing newlines in code snippets
23
34
 
24
35
  ## 0.11.3
36
+
25
37
  - Ignore menton in blockquote element
26
38
 
27
39
  ## 0.11.2
40
+
28
41
  - Support video element on `SCRIPTABLE_RULE`
29
42
 
30
43
  ## 0.11.1
44
+
31
45
  - Support email address link
32
46
 
33
47
  ## 0.11.0
48
+
34
49
  - Add `autolink` class to autolink element
35
50
  - Remove activesupport runtime dependency
36
51
 
37
52
  ## 0.10.0
53
+
38
54
  - Add ImageLink filter
39
55
 
40
56
  ## 0.9.0
57
+
41
58
  - Support html-pipeline v2
42
59
 
43
60
  ## 0.8.1
61
+
44
62
  - Fix filters configurations (thx @imishinist)
45
63
 
46
64
  ## 0.8.0
65
+
47
66
  - Sanitize data-attributes
48
67
 
49
68
  ## 0.7.1
69
+
50
70
  - Support mentions to 2-character usernames
51
71
 
52
72
  ## 0.7.0
73
+
53
74
  - Support `@all`
54
75
 
55
76
  ## 0.6.0
77
+
56
78
  - Add `:escape_html` extension to Qiita::Markdown::Greenmat::HTMLToCRenderer.
57
79
  - Fix backward incompatibility of fragment identifier of heading that includes special HTML characters in v0.5.0.
58
80
 
59
81
  ## 0.5.0
82
+
60
83
  - Add renderers Qiita::Markdown::Greenmat::HTMLRenderer and Qiita::Markdown::Greenmat::HTMLToCRenderer which can be passed to `Redcarpet::Markdown.new` and generate consistent heading fragment identifiers.
61
84
 
62
85
  ## 0.4.2
86
+
63
87
  - Fix bug on SummaryProcessor with mention
64
88
 
65
89
  ## 0.4.1
90
+
66
91
  - Ignore mention in filename label
67
92
 
68
93
  ## 0.4.0
94
+
69
95
  - Replace the core renderer redcarpet with greenmat, which is a fork of redcarpet.
70
96
  - Fix a bug where mentions with username including underscores (e.g. `@_username_`) was wrongly emphasized.
71
97
 
72
98
  ## 0.3.0
99
+
73
100
  - Introduce another processor Qiita::Markdown::SummaryProcessor, which is for rendering a summary of markdown document.
74
101
 
75
102
  ## 0.2.2
103
+
76
104
  - Fix a bug that raised error on rendering `<a>` tag with href for unknown fragment inside of `<sup>` tag (e.g. `<sup><a href="#foo.1">Link</a></sup>`)
77
105
 
78
106
  ## 0.2.1
107
+
79
108
  - Strengthen sanitization (thx xrekkusu)
80
109
 
81
110
  ## 0.2.0
111
+
82
112
  - Support text-align style on table syntax (thx @uribou)
83
113
 
84
114
  ## 0.1.9
115
+
85
116
  - Fix a bug that raised error while rendering links with absolute URI inside of `<sup>` tag (e.g. `<sup>[Qiita](http://qiita.com/)</sup>`)
86
117
 
87
118
  ## 0.1.8
119
+
88
120
  - Add title attribute into footnote link element
89
121
 
90
122
  ## 0.1.7
123
+
91
124
  - Enable footnotes markdown syntax
92
125
 
93
126
  ## 0.1.6
127
+
94
128
  - Add missing dependency on pygments.rb (thx @kwappa)
95
129
 
96
130
  ## 0.1.5
131
+
97
132
  - Memoize Redcarpet::Markdown object
98
133
 
99
134
  ## 0.1.4
135
+
100
136
  - Support type attribute of script element
101
137
 
102
138
  ## 0.1.3
139
+
103
140
  - Support text-align syntax on table
104
141
 
105
142
  ## 0.1.2
143
+
106
144
  - Support rowspan attribute
107
145
 
108
146
  ## 0.1.1
147
+
109
148
  - Support empty list
110
149
 
111
150
  ## 0.1.0
151
+
112
152
  - Default to add disabled attribute to checkbox
113
153
 
114
154
  ## 0.0.9
155
+
115
156
  - Make it Ruby 2.0.0-compatible
116
157
 
117
158
  ## 0.0.8
159
+
118
160
  - Support gapped task list
119
161
 
120
162
  ## 0.0.7
163
+
121
164
  - Change dependent gem version
122
165
 
123
166
  ## 0.0.6
167
+
124
168
  - Remove target="_blank" from a element of mention
125
169
 
126
170
  ## 0.0.5
171
+
127
172
  - Allow font element with color attribute
128
173
 
129
174
  ## 0.0.4
175
+
130
176
  - Add iframe and data-attributes support
131
177
 
132
178
  ## 0.0.3
179
+
133
180
  - Fix bug of code block that has colon-only label
134
181
 
135
182
  ## 0.0.2
183
+
136
184
  - Remove version dependency on gemoji
137
185
 
138
186
  ## 0.0.1
187
+
139
188
  - 1st Release
@@ -59,13 +59,16 @@ module Qiita
59
59
 
60
60
  # @return [String]
61
61
  def replaced_html
62
- @replaced_html ||= html.gsub(GROUP_IDENTIFIER_PATTERN) do |_match|
62
+ @replaced_html ||= html.gsub(GROUP_IDENTIFIER_PATTERN) do |string|
63
63
  team_url_name = ::Regexp.last_match(1)
64
64
  group_url_name = ::Regexp.last_match(2)
65
65
  group = { group_url_name: group_url_name, team_url_name: team_url_name }
66
66
  groups << group
67
- %(<a href="#{@group_mention_url_generator.call(group)}">) +
68
- %(@#{team_url_name}/#{group_url_name}</a>)
67
+ string.sub(
68
+ "@#{team_url_name}/#{group_url_name}",
69
+ %(<a href="#{@group_mention_url_generator.call(group)}">) +
70
+ %(@#{team_url_name}/#{group_url_name}</a>),
71
+ )
69
72
  end
70
73
  end
71
74
 
@@ -1,5 +1,5 @@
1
1
  module Qiita
2
2
  module Markdown
3
- VERSION = "0.16.0"
3
+ VERSION = "0.16.1"
4
4
  end
5
5
  end
@@ -457,7 +457,7 @@ describe Qiita::Markdown::Processor do
457
457
  end
458
458
  end
459
459
 
460
- context "with group mention" do
460
+ context "with group mention without group_memberion_url_generator" do
461
461
  let(:markdown) do
462
462
  "@alice/bob"
463
463
  end
@@ -491,6 +491,22 @@ describe Qiita::Markdown::Processor do
491
491
  end
492
492
  end
493
493
 
494
+ context "with group mention following another text" do
495
+ let(:context) do
496
+ super().merge(group_mention_url_generator: lambda do |group|
497
+ "https://#{group[:team_url_name]}.example.com/groups/#{group[:group_url_name]}"
498
+ end)
499
+ end
500
+
501
+ let(:markdown) do
502
+ "FYI @alice/bob"
503
+ end
504
+
505
+ it "preserves space after preceding text" do
506
+ is_expected.to start_with("<p>FYI <a ")
507
+ end
508
+ end
509
+
494
510
  context "with normal link" do
495
511
  let(:markdown) do
496
512
  "[](/example)"
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.16.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-15 00:00:00.000000000 Z
11
+ date: 2016-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gemoji
@@ -307,7 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
307
307
  version: '0'
308
308
  requirements: []
309
309
  rubyforge_project:
310
- rubygems_version: 2.5.1
310
+ rubygems_version: 2.4.5.1
311
311
  signing_key:
312
312
  specification_version: 4
313
313
  summary: Qiita-specified markdown processor.