wikitext 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,8 +15,8 @@
15
15
  require 'wikitext/parser'
16
16
 
17
17
  class String
18
- def to_wikitext
19
- Wikitext::Parser.shared_parser.parse wikitext_preprocess
18
+ def to_wikitext options = {}
19
+ Wikitext::Parser.shared_parser.parse wikitext_preprocess, options
20
20
  end
21
21
  alias :w :to_wikitext
22
22
 
@@ -13,5 +13,5 @@
13
13
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
14
14
 
15
15
  module Wikitext
16
- VERSION = '1.5.0'
16
+ VERSION = '1.5.1'
17
17
  end # module Wikitext
data/spec/string_spec.rb CHANGED
@@ -24,4 +24,9 @@ describe String, 'wikitext extensions' do
24
24
  it 'should provide a w method on all strings' do
25
25
  "'''strong'''".w.should == "<p><strong>strong</strong></p>\n"
26
26
  end
27
+
28
+ # the options get passed along to the parser
29
+ it 'should accept an optional options hash' do
30
+ "= foo =".w(:base_heading_level => 2).should == "<h3>foo</h3>\n"
31
+ end
27
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikitext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wincent Colaiuta
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-23 00:00:00 +01:00
12
+ date: 2009-03-17 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15