RedCloth 4.0.0 → 4.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 RedCloth might be problematic. Click here for more details.

@@ -40,9 +40,10 @@ int SYM_escape_preformatted;
40
40
  ul = "*" %{nest++; list_type = "ul";};
41
41
  ol = "#" %{nest++; list_type = "ol";};
42
42
  list_start = ( ( ul | ol )+ N A C :> " "+ ) >{nest = 0;} ;
43
- dl_start = "-" . " "+ ;
43
+ dt_start = "-" . " "+ ;
44
44
  dd_start = ":=" ;
45
45
  long_dd = dd_start " "* LF %{ ADD_BLOCK(); ASET(type, dd); } any+ >A %{ TRANSFORM(text) } :>> "=:" ;
46
+ dl_start = (dt_start mtext (LF dt_start mtext)* " "* dd_start) ;
46
47
  blank_line = LF;
47
48
  link_alias = ( "[" >{ ASET(type, ignore) } %A phrase %T "]" %A uri %{ STORE_URL(href); } ) ;
48
49
 
@@ -285,13 +286,13 @@ int SYM_escape_preformatted;
285
286
  *|;
286
287
 
287
288
  list := |*
288
- LF list_start { ADD_BLOCK(); LIST_ITEM(); };
289
+ LF list_start { ADD_BLOCK(); LIST_ITEM(); };
289
290
  block_end { ADD_BLOCK(); nest = 0; LIST_CLOSE(); fgoto main; };
290
291
  default => cat;
291
292
  *|;
292
293
 
293
294
  dl := |*
294
- LF dl_start { ADD_BLOCK(); ASET(type, dt); };
295
+ LF dt_start { ADD_BLOCK(); ASET(type, dt); };
295
296
  dd_start { ADD_BLOCK(); ASET(type, dd); };
296
297
  long_dd { INLINE(html, dd); };
297
298
  block_end { ADD_BLOCK(); INLINE(html, dl_close); fgoto main; };
@@ -312,7 +313,7 @@ int SYM_escape_preformatted;
312
313
  block_start { fgoto block; };
313
314
  footnote_start { fgoto footnote; };
314
315
  list_start { list_layout = rb_ary_new(); LIST_ITEM(); fgoto list; };
315
- dl_start { INLINE(html, dl_open); ASET(type, dt); fgoto dl; };
316
+ dl_start { p = ts; INLINE(html, dl_open); ASET(type, dt); fgoto dl; };
316
317
  table { INLINE(table, table_close); DONE(table); fgoto block; };
317
318
  link_alias { rb_hash_aset(refs_found, rb_hash_aref(regs, ID2SYM(rb_intern("text"))), rb_hash_aref(regs, ID2SYM(rb_intern("href")))); DONE(block); };
318
319
  aligned_image { rb_hash_aset(regs, ID2SYM(rb_intern("type")), plain_block); fgoto block; };
@@ -0,0 +1,6 @@
1
+ # A workaround to make Rails 2.1 gem dependency easier on case-sensitive filesystems.
2
+ # Since the gem name is RedCloth and the file is redcloth.rb, config.gem 'RedCloth' doesn't
3
+ # work. You'd have to use config.gem 'RedCloth', :lib => 'redcloth', and that's not
4
+ # immediately obvious. This file remedies that.
5
+ #
6
+ require File.join(File.dirname(__FILE__), '..', 'redcloth')
@@ -2,7 +2,7 @@ module RedCloth
2
2
  module VERSION
3
3
  MAJOR = 4
4
4
  MINOR = 0
5
- TINY = 0
5
+ TINY = 1
6
6
  RELEASE_CANDIDATE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
Binary file
@@ -123,6 +123,18 @@ in: Observe -- very nice!
123
123
  html: <p>Observe &#8212; very nice!</p>
124
124
  latex: "Observe --- very nice!\n\n"
125
125
  ---
126
+ name: parenthetical phrase set off with em dashes
127
+ desc: Sentences with two em dashes should not turn them into strikethroughs
128
+ in: An emdash indicates a parenthetical thought--like this one--which is set apart from the rest of a sentence.
129
+ html: "<p>An emdash indicates a parenthetical thought&#8212;like this one&#8212;which is set apart from the rest of a sentence.</p>"
130
+ latex: "An emdash indicates a parenthetical thought---like this one---which is set apart from the rest of a sentence.\n\n"
131
+ ---
132
+ name: parenthetical phrase set off with em dashes surrounded by spaces
133
+ desc: Sentences with two em dashes should not turn them into strikethroughs
134
+ in: An emdash indicates a parenthetical thought -- like this one -- which is set apart from the rest of a sentence.
135
+ html: "<p>An emdash indicates a parenthetical thought &#8212; like this one &#8212; which is set apart from the rest of a sentence.</p>"
136
+ latex: "An emdash indicates a parenthetical thought --- like this one --- which is set apart from the rest of a sentence.\n\n"
137
+ ---
126
138
  name: single hyphens with spaces
127
139
  desc: Single hyphens are replaced with en-dashes if they are surrounded by spaces.
128
140
  in: Observe - tiny and brief.
@@ -48,6 +48,17 @@ html: |-
48
48
  <dd>woven threads</dd>
49
49
  </dl>
50
50
  ---
51
+ name: not a definition list
52
+ desc: a definition list with no definitions is not a definition list
53
+ in: |-
54
+ - textile
55
+ - fabric
56
+ - cloth
57
+ html: |-
58
+ <p>- textile<br />
59
+ - fabric<br />
60
+ - cloth</p>
61
+ ---
51
62
  name: long definition list
52
63
  in: |-
53
64
  here is a long definition
@@ -197,6 +197,10 @@ name: link containing quotes
197
197
  in: '"He said it is "very unlikely" this works":http://slashdot.org/'
198
198
  html: '<p><a href="http://slashdot.org/">He said it is &#8220;very unlikely&#8221; this works</a></p>'
199
199
  ---
200
+ name: link containing multiple quotes
201
+ in: '"He said it is "very unlikely" the "economic stimulus" works":http://slashdot.org/'
202
+ html: '<p><a href="http://slashdot.org/">He said it is &#8220;very unlikely&#8221; the &#8220;economic stimulus&#8221; works</a></p>'
203
+ ---
200
204
  name: linked quoted phrase
201
205
  in: '""Open the pod bay doors please, HAL."":http://www.youtube.com/watch?v=npN9l2Bd06s'
202
206
  html: '<p><a href="http://www.youtube.com/watch?v=npN9l2Bd06s">&#8220;Open the pod bay doors please, <span class="caps">HAL</span>.&#8221;</a></p>'
@@ -211,4 +215,9 @@ html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(mar
211
215
  ---
212
216
  name: links contained in parentheses
213
217
  in: 'This is a regular link (but in parentheses: "Google":http://www.google.com)'
214
- html: '<p>This is a regular link (but in parentheses: <a href="http://www.google.com">Google</a>)</p>'
218
+ html: '<p>This is a regular link (but in parentheses: <a href="http://www.google.com">Google</a>)</p>'
219
+ ---
220
+ name: quotes and follow link
221
+ in: 'Some "text" followed by a "link":http://redcloth.org.'
222
+ html: '<p>Some &#8220;text&#8221; followed by a <a href="http://redcloth.org">link</a>.</p>'
223
+ lite_mode_html: 'Some &#8220;text&#8221; followed by a <a href="http://redcloth.org">link</a>.'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RedCloth
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-21 00:00:00 -04:00
12
+ date: 2008-07-24 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
- description: RedCloth-4.0.0 - Textile parser for Ruby. http://redcloth.org/
16
+ description: RedCloth-4.0.1 - Textile parser for Ruby. http://redcloth.org/
17
17
  email: redcloth-upwards@rubyforge.org
18
18
  executables:
19
19
  - redcloth
@@ -52,6 +52,8 @@ files:
52
52
  - test/textism.yml
53
53
  - test/threshold.yml
54
54
  - test/validate_fixtures.rb
55
+ - lib/case_sensitive_require
56
+ - lib/case_sensitive_require/RedCloth.rb
55
57
  - lib/redcloth
56
58
  - lib/redcloth/formatters
57
59
  - lib/redcloth/formatters/base.rb
@@ -61,17 +63,18 @@ files:
61
63
  - lib/redcloth/textile_doc.rb
62
64
  - lib/redcloth/version.rb
63
65
  - lib/redcloth.rb
66
+ - lib/redcloth_scan.bundle
64
67
  - extras/mingw-rbconfig.rb
65
68
  - extras/ragel_profiler.rb
66
69
  - ext/redcloth_scan/redcloth.h
70
+ - ext/redcloth_scan/redcloth_attributes.c
71
+ - ext/redcloth_scan/redcloth_inline.c
72
+ - ext/redcloth_scan/redcloth_scan.c
67
73
  - ext/redcloth_scan/extconf.rb
68
74
  - ext/redcloth_scan/redcloth_attributes.rl
69
75
  - ext/redcloth_scan/redcloth_common.rl
70
76
  - ext/redcloth_scan/redcloth_inline.rl
71
77
  - ext/redcloth_scan/redcloth_scan.rl
72
- - ext/redcloth_scan/redcloth_attributes.c
73
- - ext/redcloth_scan/redcloth_inline.c
74
- - ext/redcloth_scan/redcloth_scan.c
75
78
  has_rdoc: true
76
79
  homepage: http://redcloth.org/
77
80
  post_install_message:
@@ -79,6 +82,7 @@ rdoc_options: []
79
82
 
80
83
  require_paths:
81
84
  - lib
85
+ - lib/case_sensitive_require
82
86
  required_ruby_version: !ruby/object:Gem::Requirement
83
87
  requirements:
84
88
  - - ">="
@@ -93,10 +97,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
97
  version:
94
98
  requirements: []
95
99
 
96
- rubyforge_project:
100
+ rubyforge_project: redcloth
97
101
  rubygems_version: 1.1.1
98
102
  signing_key:
99
103
  specification_version: 2
100
- summary: RedCloth-4.0.0 - Textile parser for Ruby. http://redcloth.org/
104
+ summary: RedCloth-4.0.1 - Textile parser for Ruby. http://redcloth.org/
101
105
  test_files: []
102
106