kramdown 1.0.0 → 1.0.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 +8 -8
- data/CONTRIBUTERS +1 -1
- data/Rakefile +2 -1
- data/VERSION +1 -1
- data/doc/default.scss.css +7 -0
- data/doc/sidebar.template +2 -2
- data/lib/kramdown/options.rb +2 -0
- data/lib/kramdown/parser/base.rb +2 -2
- data/lib/kramdown/parser/kramdown/extensions.rb +13 -7
- data/lib/kramdown/version.rb +1 -1
- data/man/man1/kramdown.1 +2 -0
- data/test/testcases/block/11_ial/simple.html +2 -0
- data/test/testcases/block/11_ial/simple.text +3 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTMyMzYyMTE4OTYwNDRjYzdkMDZjN2M3NWY2MTE4ZmMwYjE4Mzc2OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODQyZDZkMjc5ZjNlNTA1MjcxZjFmZTgzZTMyOTRhMmVmYzE1NjFkYw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGE2YTZlNzUwMjE3ZTAyOGU1MGYwOWRlMjU5NmQ0NTJkNDc0Mjg3NGE3MjBh
|
10
|
+
MzkxMDIzNzU4MjE0ZTZlMjJjMWNiYWFkY2M3NmMxNjYyMzQwMmNiMTQ0YmE0
|
11
|
+
MDUwNDI3MGIzYWNjNGZlOGE4MzBhMDIxN2NiZWFjMmJjM2Q5Zjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDFkOGYxZjg5NjRmM2JlMTEzZDQ4ZTgxYmU3N2M4Y2Y1MGM5MDVkMGMwM2Y4
|
14
|
+
YzRmYWQ2YzFlZjMxNzIxYmY4ZGE5YzJiZTc0N2M4YzI5MGIxOGM4NGMxMjZk
|
15
|
+
OTVhMDRlN2YzMWNlOGUxMGE3MjE5Y2Q1Y2FiMzdlMTMzZGE2M2Y=
|
data/CONTRIBUTERS
CHANGED
data/Rakefile
CHANGED
@@ -181,6 +181,7 @@ EOF
|
|
181
181
|
s.executables = ['kramdown']
|
182
182
|
s.default_executable = 'kramdown'
|
183
183
|
s.add_development_dependency 'coderay', '~> 1.0.0'
|
184
|
+
s.add_development_dependency 'stringex', '~> 1.5.1'
|
184
185
|
|
185
186
|
#### Documentation
|
186
187
|
|
@@ -236,7 +237,7 @@ EOF
|
|
236
237
|
rf.configure
|
237
238
|
rf.login
|
238
239
|
|
239
|
-
content = REL_PAGE.blocks['content']
|
240
|
+
content = REL_PAGE.blocks['content'].content.force_encoding('ASCII-8BIT')
|
240
241
|
content += "\n\n\nAbout kramdown\n\n#{SUMMARY}\n\n#{DESCRIPTION}"
|
241
242
|
rf.post_news('kramdown', "kramdown #{Kramdown::VERSION} released", content)
|
242
243
|
puts "done"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/doc/default.scss.css
CHANGED
@@ -11,6 +11,7 @@ aside a {
|
|
11
11
|
&:hover {
|
12
12
|
text-decoration: underline;
|
13
13
|
}
|
14
|
+
|
14
15
|
}
|
15
16
|
|
16
17
|
#content {
|
@@ -179,3 +180,9 @@ acronym {
|
|
179
180
|
.clear {
|
180
181
|
clear: both;
|
181
182
|
}
|
183
|
+
|
184
|
+
.inline-important {
|
185
|
+
font-weight: bold;
|
186
|
+
display: block;
|
187
|
+
text-align: center;
|
188
|
+
}
|
data/doc/sidebar.template
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<h2>News</h2>
|
2
2
|
|
3
|
-
<p>The latest version of kramdown is <
|
4
|
-
on <
|
3
|
+
<p>The latest version of kramdown is <span class="inline-important">1.0.1</span> and it was released
|
4
|
+
on <span class="inline-important">2013-03-11</span></p>
|
5
5
|
|
6
6
|
<p>More <a href="{relocatable: news.html}">news</a>…</p>
|
7
7
|
|
data/lib/kramdown/options.rb
CHANGED
@@ -196,6 +196,8 @@ languages with many non-ASCII characters. By enabling this option
|
|
196
196
|
the header text is transliterated to ASCII as good as possible so that
|
197
197
|
the resulting header ID is more useful.
|
198
198
|
|
199
|
+
The stringex library needs to be installed for this feature to work!
|
200
|
+
|
199
201
|
Default: false
|
200
202
|
Used by: HTML/Latex converter
|
201
203
|
EOF
|
data/lib/kramdown/parser/base.rb
CHANGED
@@ -85,9 +85,9 @@ module Kramdown
|
|
85
85
|
# Modify the string +source+ to be usable by the parser (unifies line ending characters to
|
86
86
|
# +\n+ and makes sure +source+ ends with a new line character).
|
87
87
|
def adapt_source(source)
|
88
|
-
if source.respond_to?(:encode
|
88
|
+
if source.respond_to?(:encode)
|
89
89
|
raise "The encoding of the source text is not valid!" if !source.valid_encoding?
|
90
|
-
source.encode
|
90
|
+
source = source.encode('UTF-8')
|
91
91
|
end
|
92
92
|
source.gsub(/\r\n?/, "\n").chomp + "\n"
|
93
93
|
end
|
@@ -17,14 +17,18 @@ module Kramdown
|
|
17
17
|
# +opts+.
|
18
18
|
def parse_attribute_list(str, opts)
|
19
19
|
attrs = str.scan(ALD_TYPE_ANY)
|
20
|
-
attrs.each do |key, sep, val,
|
20
|
+
attrs.each do |key, sep, val, ref, id_and_or_class, _, _|
|
21
21
|
if ref
|
22
22
|
(opts[:refs] ||= []) << ref
|
23
|
-
elsif
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
elsif id_and_or_class
|
24
|
+
id_and_or_class.scan(ALD_TYPE_ID_OR_CLASS).each do |id_attr, class_attr|
|
25
|
+
if class_attr
|
26
|
+
opts[IAL_CLASS_ATTR] = (opts[IAL_CLASS_ATTR] || '') << " #{class_attr}"
|
27
|
+
opts[IAL_CLASS_ATTR].lstrip!
|
28
|
+
else
|
29
|
+
opts['id'] = id_attr
|
30
|
+
end
|
31
|
+
end
|
28
32
|
else
|
29
33
|
val.gsub!(/\\(\}|#{sep})/, "\\1")
|
30
34
|
opts[key] = val
|
@@ -125,8 +129,10 @@ module Kramdown
|
|
125
129
|
ALD_TYPE_KEY_VALUE_PAIR = /(#{ALD_ID_NAME})=("|')((?:\\\}|\\\2|[^\}\2])*?)\2/
|
126
130
|
ALD_TYPE_CLASS_NAME = /\.(#{ALD_ID_NAME})/
|
127
131
|
ALD_TYPE_ID_NAME = /#(\w[\w:-]*)/
|
132
|
+
ALD_TYPE_ID_OR_CLASS = /#{ALD_TYPE_ID_NAME}|#{ALD_TYPE_CLASS_NAME}/
|
133
|
+
ALD_TYPE_ID_OR_CLASS_MULTI = /((?:#{ALD_TYPE_ID_NAME}|#{ALD_TYPE_CLASS_NAME})+)/
|
128
134
|
ALD_TYPE_REF = /(#{ALD_ID_NAME})/
|
129
|
-
ALD_TYPE_ANY = /(?:\A|\s)(?:#{ALD_TYPE_KEY_VALUE_PAIR}|#{
|
135
|
+
ALD_TYPE_ANY = /(?:\A|\s)(?:#{ALD_TYPE_KEY_VALUE_PAIR}|#{ALD_TYPE_REF}|#{ALD_TYPE_ID_OR_CLASS_MULTI})(?=\s|\Z)/
|
130
136
|
ALD_START = /^#{OPT_SPACE}\{:(#{ALD_ID_NAME}):(#{ALD_ANY_CHARS}+)\}\s*?\n/
|
131
137
|
|
132
138
|
EXT_STOP_STR = "\\{:/(%s)?\\}"
|
data/lib/kramdown/version.rb
CHANGED
data/man/man1/kramdown.1
CHANGED
@@ -93,6 +93,8 @@ languages with many non-ASCII characters. By enabling this option
|
|
93
93
|
the header text is transliterated to ASCII as good as possible so that
|
94
94
|
the resulting header ID is more useful.
|
95
95
|
|
96
|
+
The stringex library needs to be installed for this feature to work!
|
97
|
+
|
96
98
|
Default: false
|
97
99
|
Used by: HTML/Latex converter
|
98
100
|
|
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.0.
|
4
|
+
version: 1.0.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: 2013-03-
|
11
|
+
date: 2013-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coderay
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: stringex
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.5.1
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.5.1
|
27
41
|
description: ! 'kramdown is yet-another-markdown-parser but fast, pure Ruby,
|
28
42
|
|
29
43
|
using a strict syntax definition and supporting several common extensions.
|