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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGVjNDY0Nzc3OTdiZjA1Yzg2MTEwZWJjMGE2NjllNjJiYzk4OTk5OQ==
4
+ MTMyMzYyMTE4OTYwNDRjYzdkMDZjN2M3NWY2MTE4ZmMwYjE4Mzc2OQ==
5
5
  data.tar.gz: !binary |-
6
- NzNlYWRiNGEyZjg2OTA0ZjA2Zjk3MmFlYTRkYzk4ZTBjNmE2ZTc0OQ==
6
+ ODQyZDZkMjc5ZjNlNTA1MjcxZjFmZTgzZTMyOTRhMmVmYzE1NjFkYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NGRmZGQ1NjUwOWNlYzM0NjIyZDczNTliYWE0OGM1NjQwYTdkN2VkY2Y4MDIz
10
- YTMwZjE1ZTYyNDAyNDlkZTc2ZjdhZDJjNWVlYmZiZTFlZTRkMzE0MjZhMmM1
11
- ZDljMzJkNzQyZGM4NzFiMDQ3MTIwMjBhZWRkOTg0ZjhiNjAwNjI=
9
+ ZGE2YTZlNzUwMjE3ZTAyOGU1MGYwOWRlMjU5NmQ0NTJkNDc0Mjg3NGE3MjBh
10
+ MzkxMDIzNzU4MjE0ZTZlMjJjMWNiYWFkY2M3NmMxNjYyMzQwMmNiMTQ0YmE0
11
+ MDUwNDI3MGIzYWNjNGZlOGE4MzBhMDIxN2NiZWFjMmJjM2Q5Zjg=
12
12
  data.tar.gz: !binary |-
13
- ZDg2ZDA4MDc2ZjMxYmZlNzk4NDk4YzI4MTM5ZTAyZjYwNTk4ZTNmNjFjNGE2
14
- ZmEyZDU4OTRiYjc2MjU4NTEyZTAwMTA0MTJiNGI2NmNmNGRjZDFlMDI3M2Nl
15
- Y2RhZmJiNDBkZTM0ZjMzYzk2N2U3YmViNDVkY2YxMjE2MDJlNDg=
13
+ MDFkOGYxZjg5NjRmM2JlMTEzZDQ4ZTgxYmU3N2M4Y2Y1MGM5MDVkMGMwM2Y4
14
+ YzRmYWQ2YzFlZjMxNzIxYmY4ZGE5YzJiZTc0N2M4YzI5MGIxOGM4NGMxMjZk
15
+ OTVhMDRlN2YzMWNlOGUxMGE3MjE5Y2Q1Y2FiMzdlMTMzZGE2M2Y=
data/CONTRIBUTERS CHANGED
@@ -1,6 +1,6 @@
1
1
  Count Name
2
2
  ======= ====
3
- 571 Thomas Leitner <t_leitner@gmx.at>
3
+ 576 Thomas Leitner <t_leitner@gmx.at>
4
4
  6 Gioele Barabucci <gioele@svario.it>
5
5
  3 gettalong <t_leitner@gmx.at>
6
6
  3 Ben Armston <ben.armston@googlemail.com>
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.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 <b>1.0.0</b> and it was released
4
- on <b>2013-03-10</b>.</p>
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
 
@@ -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
@@ -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!('UTF-8')
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, id_attr, class_attr, ref|
20
+ attrs.each do |key, sep, val, ref, id_and_or_class, _, _|
21
21
  if ref
22
22
  (opts[:refs] ||= []) << ref
23
- elsif class_attr
24
- opts[IAL_CLASS_ATTR] = (opts[IAL_CLASS_ATTR] || '') << " #{class_attr}"
25
- opts[IAL_CLASS_ATTR].lstrip!
26
- elsif id_attr
27
- opts['id'] = id_attr
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}|#{ALD_TYPE_ID_NAME}|#{ALD_TYPE_CLASS_NAME}|#{ALD_TYPE_REF})(?=\s|\Z)/
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)?\\}"
@@ -10,6 +10,6 @@
10
10
  module Kramdown
11
11
 
12
12
  # The kramdown version.
13
- VERSION = '1.0.0'
13
+ VERSION = '1.0.1'
14
14
 
15
15
  end
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
 
@@ -1,5 +1,7 @@
1
1
  <p key1="val&quot;" key2="val'" class="other-class myclass class" id="other" key="val">Some paragraph.</p>
2
2
 
3
+ <p class="cls1 cls2" id="id">Some paragraph.</p>
4
+
3
5
  <blockquote id="id" class="class">
4
6
  <p>quote</p>
5
7
  </blockquote>
@@ -1,6 +1,9 @@
1
1
  Some paragraph.
2
2
  {:.class id key="val"}
3
3
 
4
+ Some paragraph.
5
+ {:.cls1#id.cls2}
6
+
4
7
  > quote
5
8
  {: #id}
6
9
  {: .class}
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.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-10 00:00:00.000000000 Z
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.