BBRedCloth 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
data/BBRedCloth.gemspec CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{BBRedCloth}
5
- s.version = "0.8.3"
5
+ s.version = "0.8.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ryan Alyea"]
9
- s.date = %q{2011-06-09}
9
+ s.date = %q{2011-06-12}
10
10
  s.default_executable = %q{redcloth}
11
- s.description = %q{BBRedCloth-0.8.3 - Textile parser for Ruby. Includes BBCode additions.
11
+ s.description = %q{BBRedCloth-0.8.4 - Textile parser for Ruby. Includes BBCode additions.
12
12
  http://redcloth.org/}
13
13
  s.email = %q{ryan@fangamer.com}
14
14
  s.executables = ["redcloth"]
@@ -21,7 +21,7 @@ http://redcloth.org/}
21
21
  s.required_ruby_version = Gem::Requirement.new(">= 1.8.4")
22
22
  s.rubyforge_project = %q{bbredcloth}
23
23
  s.rubygems_version = %q{1.3.7}
24
- s.summary = %q{BBRedCloth-0.8.3 - Textile parser for Ruby. Includes BBCode additions. http://redcloth.org/}
24
+ s.summary = %q{BBRedCloth-0.8.4 - Textile parser for Ruby. Includes BBCode additions. http://redcloth.org/}
25
25
  s.test_files = ["test/test_custom_tags.rb", "test/test_erb.rb", "test/test_extensions.rb", "test/test_formatters.rb", "test/test_parser.rb", "test/test_restrictions.rb"]
26
26
 
27
27
  if s.respond_to? :specification_version then
data/README.textile CHANGED
@@ -111,6 +111,7 @@ You can disable the following:
111
111
  * :quote2
112
112
  * :multi_paragraph_quote
113
113
  * :link_alias
114
+ * :noparagraph_line_start (ie. spaces at the beginning of a paragraph do not render <p> tags.)
114
115
 
115
116
  h3. BBCode-Only
116
117
 
@@ -45,6 +45,8 @@ VALUE redcloth_bbcode_inline2(VALUE, VALUE, VALUE);
45
45
 
46
46
  /* parser macros */
47
47
  #define CALL_STACK_SIZE 20
48
+ #define UNLESS_DISABLED_BLOCK(H, T, F) \
49
+ if (rb_funcall(rb_funcall(self, rb_intern("disable_inline"), 0),rb_intern("include?"), 1,ID2SYM(rb_intern(#T))) != Qtrue) { F }
48
50
  #define UNLESS_DISABLED_INLINE(H, T, F) \
49
51
  if (rb_funcall(rb_funcall(self, rb_intern("disable_inline"), 0),rb_intern("include?"), 1,ID2SYM(rb_intern(#T))) == Qtrue) { rb_str_append(H,red_passthrough(self, ts, te, refs)); } \
50
52
  else { /*VALUE test = rb_str_new(ts,te-ts); printf("\nred_passthrough_else() '%s'\n", RSTRING(test)->ptr);*/ F }
@@ -10468,7 +10468,7 @@ _eof_trans:
10468
10468
  break;
10469
10469
  case 189:
10470
10470
  #line 393 "ext/redcloth_scan/redcloth_scan.c.rl"
10471
- {te = p;p--;{ ASET("type", "ignored_line"); {cs = 2468; goto _again;} }}
10471
+ {te = p;p--;{ UNLESS_DISABLED_BLOCK(block,noparagraph_line_start,ASET("type", "ignored_line"); {cs = 2468; goto _again;}) }}
10472
10472
  break;
10473
10473
  case 190:
10474
10474
  #line 395 "ext/redcloth_scan/redcloth_scan.c.rl"
@@ -10593,7 +10593,7 @@ _eof_trans:
10593
10593
  {{p = ((te))-1;} rb_str_append(failed_start,rb_str_new(ts,te-ts)); failed_start_point_p = p; failed_start_point_ts = ts; failed_start_point_te = te; store_title = 0; {cs = 2495; goto _again;} }
10594
10594
  break;
10595
10595
  case 61:
10596
- {{p = ((te))-1;} ASET("type", "ignored_line"); {cs = 2468; goto _again;} }
10596
+ {{p = ((te))-1;} UNLESS_DISABLED_BLOCK(block,noparagraph_line_start,ASET("type", "ignored_line"); {cs = 2468; goto _again;}) }
10597
10597
  break;
10598
10598
  case 64:
10599
10599
  {{p = ((te))-1;} CAT(block); {cs = 2465; goto _again;} }
@@ -390,7 +390,7 @@
390
390
  bb_quote_tag_start { rb_str_append(failed_start,rb_str_new(ts,te-ts)); failed_start_point_p = p; failed_start_point_ts = ts; failed_start_point_te = te; store_cite = 0; fgoto bb_quote_tag; };
391
391
  bb_spoiler_tag_start { rb_str_append(failed_start,rb_str_new(ts,te-ts)); failed_start_point_p = p; failed_start_point_ts = ts; failed_start_point_te = te; store_title = 0; fgoto bb_spoiler_tag; };
392
392
 
393
- noparagraph_line_start { ASET("type", "ignored_line"); fgoto noparagraph_line; };
393
+ noparagraph_line_start { UNLESS_DISABLED_BLOCK(block,noparagraph_line_start,ASET("type", "ignored_line"); fgoto noparagraph_line;) };
394
394
  notextile_tag_start { ASET("type", "notextile"); fgoto notextile_tag; };
395
395
  notextile_block_start { ASET("type", "notextile"); fgoto notextile_block; };
396
396
  script_tag_start { CAT(block); fgoto script_tag; };
@@ -2,7 +2,7 @@ module RedCloth
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 8
5
- TINY = 3
5
+ TINY = 4
6
6
  RELEASE_CANDIDATE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
@@ -43,7 +43,7 @@ class TestRestrictions < Test::Unit::TestCase
43
43
  end
44
44
 
45
45
  generate_formatter_tests('general_disable_inline') do |doc|
46
- RedCloth.new(doc['in'], [:disable_inline=>[:strong,:del,:align]]).to_html
46
+ RedCloth.new(doc['in'], [:disable_inline=>[:strong,:del,:align,:noparagraph_line_start]]).to_html
47
47
  end
48
48
 
49
49
  generate_formatter_tests('bbcode') do |doc|
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: BBRedCloth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 55
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 3
10
- version: 0.8.3
9
+ - 4
10
+ version: 0.8.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Alyea
@@ -15,12 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-09 00:00:00 -07:00
18
+ date: 2011-06-12 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
22
22
  description: |-
23
- BBRedCloth-0.8.3 - Textile parser for Ruby. Includes BBCode additions.
23
+ BBRedCloth-0.8.4 - Textile parser for Ruby. Includes BBCode additions.
24
24
  http://redcloth.org/
25
25
  email: ryan@fangamer.com
26
26
  executables:
@@ -148,7 +148,7 @@ rubyforge_project: bbredcloth
148
148
  rubygems_version: 1.3.7
149
149
  signing_key:
150
150
  specification_version: 3
151
- summary: BBRedCloth-0.8.3 - Textile parser for Ruby. Includes BBCode additions. http://redcloth.org/
151
+ summary: BBRedCloth-0.8.4 - Textile parser for Ruby. Includes BBCode additions. http://redcloth.org/
152
152
  test_files:
153
153
  - test/test_custom_tags.rb
154
154
  - test/test_erb.rb