RedCloth 4.1.0 → 4.1.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.

@@ -194,6 +194,9 @@ redcloth_latex_esc(VALUE self, VALUE str)
194
194
  return new_str;
195
195
  }
196
196
 
197
+ /*
198
+ * Transforms a Textile document with +formatter+
199
+ */
197
200
  static VALUE
198
201
  redcloth_to(self, formatter)
199
202
  VALUE self, formatter;
@@ -37,6 +37,7 @@
37
37
  dl_start = (dt_start mtext (LF dt_start mtext)* " "* dd_start) ;
38
38
  blank_line = LF;
39
39
  link_alias = ( "[" >{ ASET("type", "ignore"); } %A chars %T "]" %A uri %{ STORE_URL("href"); } ) ;
40
+ horizontal_rule = '*'{3,} | '-'{3,} | '_'{3,} ;
40
41
 
41
42
  # image lookahead
42
43
  IMG_A_LEFT = "<" %{ ASET("float", "left"); } ;
@@ -44,7 +45,7 @@
44
45
  aligned_image = ( "["? "!" (IMG_A_LEFT | IMG_A_RIGHT) ) >A @{ p = reg - 1; } ;
45
46
 
46
47
  # html blocks
47
- BlockTagName = Name - ("pre" | "notextile" | "a" | "applet" | "basefont" | "bdo" | "br" | "font" | "iframe" | "img" | "map" | "object" | "param" | "q" | "script" | "span" | "sub" | "sup" | "abbr" | "acronym" | "cite" | "code" | "del" | "dfn" | "em" | "ins" | "kbd" | "samp" | "strong" | "var" | "b" | "big" | "i" | "s" | "small" | "strike" | "tt" | "u");
48
+ BlockTagName = Name - ("pre" | "notextile" | "a" | "applet" | "basefont" | "bdo" | "br" | "font" | "iframe" | "img" | "map" | "object" | "param" | "embed" | "q" | "script" | "span" | "sub" | "sup" | "abbr" | "acronym" | "cite" | "code" | "del" | "dfn" | "em" | "ins" | "kbd" | "samp" | "strong" | "var" | "b" | "big" | "i" | "s" | "small" | "strike" | "tt" | "u");
48
49
  block_start_tag = "<" BlockTagName space+ AttrSet* (AttrEnd)? ">" | "<" BlockTagName ">";
49
50
  block_empty_tag = "<" BlockTagName space+ AttrSet* (AttrEnd)? "/>" | "<" BlockTagName "/>" ;
50
51
  block_end_tag = "</" BlockTagName space* ">" ;
@@ -303,6 +304,7 @@
303
304
  bq_start { INLINE(html, "bq_open"); ASET("type", "p"); fgoto bq; };
304
305
  block_start { fgoto block; };
305
306
  footnote_start { fgoto footnote; };
307
+ horizontal_rule { INLINE(html, "hr"); };
306
308
  list_start { CLEAR_LIST(); LIST_ITEM(); fgoto list; };
307
309
  dl_start { p = ts; INLINE(html, "dl_open"); ASET("type", "dt"); fgoto dl; };
308
310
  table { INLINE(table, "table_close"); DONE(table); fgoto block; };
@@ -33,6 +33,10 @@ module RedCloth::Formatters::HTML
33
33
  end
34
34
  end
35
35
 
36
+ def hr(opts)
37
+ "<hr />\n"
38
+ end
39
+
36
40
  def acronym(opts)
37
41
  opts[:block] = true
38
42
  "<acronym#{pba(opts)}>#{caps(:text => opts[:text])}</acronym>"
@@ -2,7 +2,7 @@ module RedCloth
2
2
  module VERSION
3
3
  MAJOR = 4
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
  RELEASE_CANDIDATE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
@@ -868,3 +868,51 @@ in: |-
868
868
  html: |-
869
869
  <p>citation [&#8220;(Berk.) Hilton&#8221;], see<br />
870
870
  [Papers &#8220;blah blah.&#8221;]</p>
871
+ ---
872
+ name: horizontal rule using asterisks
873
+ in: |-
874
+ Just some *** text
875
+
876
+ ***
877
+
878
+ Some more text.
879
+ html: |-
880
+ <p>Just some <strong>*</strong> text</p>
881
+ <hr />
882
+ <p>Some more text.</p>
883
+ ---
884
+ name: horizontal rule using more than three asterisks
885
+ in: |-
886
+ Just some **** text
887
+
888
+ ****
889
+
890
+ Some more text.
891
+ html: |-
892
+ <p>Just some **** text</p>
893
+ <hr />
894
+ <p>Some more text.</p>
895
+ ---
896
+ name: horizontal rule using dashes
897
+ in: |-
898
+ Just some --- text
899
+
900
+ ---
901
+
902
+ Some more text.
903
+ html: |-
904
+ <p>Just some <del>-</del> text</p>
905
+ <hr />
906
+ <p>Some more text.</p>
907
+ ---
908
+ name: horizontal rule using underscores
909
+ in: |-
910
+ Just some ___ text
911
+
912
+ ___
913
+
914
+ Some more text.
915
+ html: |-
916
+ <p>Just some <em>_</em> text</p>
917
+ <hr />
918
+ <p>Some more text.</p>
@@ -300,6 +300,12 @@ html: '<p><a href="http://foo.com/bar?something=1~2~3">http://foo.com/bar?someth
300
300
  ---
301
301
  name: empty block
302
302
  in: |-
303
- <embed src="test.swf"></embed>
303
+ <div class="test"></div>
304
304
  html: |-
305
- <embed src="test.swf"></embed>
305
+ <div class="test"></div>
306
+ ---
307
+ name: objects in paragraphs are not modified
308
+ in: |-
309
+ <p><object width="340" height="280"><param name="movie" value="http://www.youtube.com/v/iUbK1cBHm6E"></param><param name="wmode" value="opaque"></param><param name="allowScriptAccess" value="sameDomain"></param><embed src="http://www.youtube.com/v/iUbK1cBHm6E" type="application/x-shockwave-flash" width="340" height="280" wmode="opaque" allowScriptAccess="sameDomain"></embed></object></p>
310
+ html: |-
311
+ <p><object width="340" height="280"><param name="movie" value="http://www.youtube.com/v/iUbK1cBHm6E"></param><param name="wmode" value="opaque"></param><param name="allowScriptAccess" value="sameDomain"></param><embed src="http://www.youtube.com/v/iUbK1cBHm6E" type="application/x-shockwave-flash" width="340" height="280" wmode="opaque" allowScriptAccess="sameDomain"></embed></object></p>
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.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-31 00:00:00 -04:00
12
+ date: 2008-11-19 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,7 +22,7 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "0"
24
24
  version:
25
- description: RedCloth-4.1.0 - Textile parser for Ruby. http://redcloth.org/
25
+ description: RedCloth-4.1.1 - Textile parser for Ruby. http://redcloth.org/
26
26
  email: redcloth-upwards@rubyforge.org
27
27
  executables:
28
28
  - redcloth
@@ -71,7 +71,6 @@ files:
71
71
  - Manifest
72
72
  - Rakefile
73
73
  - README
74
- - RedCloth.gemspec
75
74
  - setup.rb
76
75
  - test/basic.yml
77
76
  - test/code.yml
@@ -97,6 +96,7 @@ files:
97
96
  - test/textism.yml
98
97
  - test/threshold.yml
99
98
  - test/validate_fixtures.rb
99
+ - RedCloth.gemspec
100
100
  - ext/redcloth_scan/redcloth_attributes.c
101
101
  - ext/redcloth_scan/redcloth_inline.c
102
102
  - ext/redcloth_scan/redcloth_scan.c
@@ -113,6 +113,7 @@ rdoc_options:
113
113
  require_paths:
114
114
  - lib
115
115
  - ext
116
+ - lib/case_sensitive_require
116
117
  required_ruby_version: !ruby/object:Gem::Requirement
117
118
  requirements:
118
119
  - - ">="
@@ -128,10 +129,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
129
  requirements: []
129
130
 
130
131
  rubyforge_project: redcloth
131
- rubygems_version: 1.2.0
132
+ rubygems_version: 1.3.1
132
133
  signing_key:
133
134
  specification_version: 2
134
- summary: RedCloth-4.1.0 - Textile parser for Ruby. http://redcloth.org/
135
+ summary: RedCloth-4.1.1 - Textile parser for Ruby. http://redcloth.org/
135
136
  test_files:
136
137
  - test/test_custom_tags.rb
137
138
  - test/test_erb.rb