kramdown 1.13.0 → 1.13.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kramdown might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CONTRIBUTERS +1 -1
- data/VERSION +1 -1
- data/doc/index.page +2 -2
- data/lib/kramdown/parser/gfm.rb +22 -0
- data/lib/kramdown/version.rb +1 -1
- data/test/testcases_gfm/header_ids.html +10 -0
- data/test/testcases_gfm/header_ids.html.19 +10 -0
- data/test/testcases_gfm/header_ids.text +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f420a0557f646bc3286832c0ad6af10499d92e73
|
4
|
+
data.tar.gz: 512e4690db83ec700e49c20ca43083135ac3602d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49637143c48081e1465c0d4a8d4074a743cb426a5331a340eeab5be61cd80b03a0fc215785cde3cc05340c9702dff031e355e87b94748c686e668e08f1574ad7
|
7
|
+
data.tar.gz: b87998b4f079b2edf1bca0b9c331740e5bee44e2a1f88b0fa7ffed90af5251a52e2ba0b109a807901a2b410e737b4950136ba0fc6915fb35e0c7e5f977de51c0
|
data/CONTRIBUTERS
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.13.
|
1
|
+
1.13.1
|
data/doc/index.page
CHANGED
@@ -97,8 +97,8 @@ extensions that have been made popular by the [PHP Markdown Extra] package and [
|
|
97
97
|
It is probably the fastest pure-Ruby Markdown converter available (September 2014), being about 3x
|
98
98
|
faster than [Maruku] and about 4.5x faster than [BlueFeather].
|
99
99
|
|
100
|
-
Version **1.13.
|
101
|
-
**2016-11-
|
100
|
+
Version **1.13.1**{:itemprop="softwareVersion"} released on
|
101
|
+
**2016-11-25**{:itemprop="datePublished"}, [more news](news.html)
|
102
102
|
{: style="text-align: center; font-size: 80%"}
|
103
103
|
|
104
104
|
</div>
|
data/lib/kramdown/parser/gfm.rb
CHANGED
@@ -72,6 +72,28 @@ module Kramdown
|
|
72
72
|
end.flatten!
|
73
73
|
end
|
74
74
|
|
75
|
+
# Update the raw text for automatic ID generation.
|
76
|
+
def update_raw_text(item)
|
77
|
+
raw_text = ''
|
78
|
+
|
79
|
+
append_text = lambda do |child|
|
80
|
+
if child.type == :text || child.type == :codespan || child.type ==:math
|
81
|
+
raw_text << child.value
|
82
|
+
elsif child.type == :entity
|
83
|
+
raw_text << child.value.char
|
84
|
+
elsif child.type == :smart_quote
|
85
|
+
raw_text << ::Kramdown::Utils::Entities.entity(child.value.to_s).char
|
86
|
+
elsif child.type == :typographic_sym
|
87
|
+
raw_text << ::Kramdown::Utils::Entities.entity(child.value.to_s).char
|
88
|
+
else
|
89
|
+
child.children.each {|c| append_text.call(c)}
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
append_text.call(item)
|
94
|
+
item.options[:raw_text] = raw_text
|
95
|
+
end
|
96
|
+
|
75
97
|
NON_WORD_RE = (RUBY_VERSION > "1.9" ? /[^\p{Word}\- \t]/ : /[^\w\- \t]/)
|
76
98
|
|
77
99
|
def generate_gfm_header_id(text)
|
data/lib/kramdown/version.rb
CHANGED
@@ -15,3 +15,13 @@
|
|
15
15
|
<h3 id="-1">;;</h3>
|
16
16
|
|
17
17
|
<h3 id="before--after-tab">before after tab</h3>
|
18
|
+
|
19
|
+
<h3 id="with-code">with <code>code</code></h3>
|
20
|
+
|
21
|
+
<h3 id="with-space">with Ä space</h3>
|
22
|
+
|
23
|
+
<h3 id="with-smart-quotes">With “smart” quotes</h3>
|
24
|
+
|
25
|
+
<h3 id="with--typographic--symbols">with — typographic … symbols</h3>
|
26
|
+
|
27
|
+
<h3 id="with-m5">with <script type="math/tex">m=5</script></h3>
|
@@ -15,3 +15,13 @@
|
|
15
15
|
<h3 id="-1">;;</h3>
|
16
16
|
|
17
17
|
<h3 id="before--after-tab">before after tab</h3>
|
18
|
+
|
19
|
+
<h3 id="with-code">with <code>code</code></h3>
|
20
|
+
|
21
|
+
<h3 id="with-Äspace">with Ä space</h3>
|
22
|
+
|
23
|
+
<h3 id="with-smart-quotes">With “smart” quotes</h3>
|
24
|
+
|
25
|
+
<h3 id="with--typographic--symbols">with — typographic … symbols</h3>
|
26
|
+
|
27
|
+
<h3 id="with-m5">with <script type="math/tex">m=5</script></h3>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kramdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.13.
|
4
|
+
version: 1.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Leitner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|