wikicloth 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -74,8 +74,8 @@ module WikiCloth
74
74
  else
75
75
  ret = "<h#{self.depth}>" + (options[:noedit] == true ? "" :
76
76
  "<span class=\"editsection\">&#91;<a href=\"" + options[:link_handler].section_link(self.id) +
77
- "\" title=\"Edit section: #{self.title}\">edit</a>&#93;</span>") +
78
- " <span id=\"#{self.id}\" class=\"mw-headline\">#{self.title}</span></h#{self.depth}>"
77
+ "\" title=\"Edit section: #{self.title}\">edit</a>&#93;</span> ") +
78
+ "<span id=\"#{self.id}\" class=\"mw-headline\">#{self.title}</span></h#{self.depth}>"
79
79
  end
80
80
  ret += @template ? self.gsub(/\{\{\{\s*([A-Za-z0-9]+)\s*\}\}\}/,'\1') : self
81
81
  ret += "__TOC__" if @auto_toc
@@ -94,9 +94,10 @@ class WikiBuffer::Var < WikiBuffer
94
94
  default.nil? ? "" : default
95
95
  when "#expr"
96
96
  begin
97
+ puts params.first.inspect
97
98
  ExpressionParser::Parser.new.parse(params.first)
98
99
  rescue RuntimeError
99
- 'Expression error: ' + $!
100
+ "Expression error: #{$!}"
100
101
  end
101
102
  when "#ifeq"
102
103
  if params[0] =~ /^[0-9A-Fa-f]+$/ && params[1] =~ /^[0-9A-Fa-f]+$/
data/lib/wikicloth.rb CHANGED
@@ -10,7 +10,7 @@ String.send(:include, ExtendedString)
10
10
 
11
11
  module WikiCloth
12
12
 
13
- VERSION = "0.6.0"
13
+ VERSION = "0.6.1"
14
14
 
15
15
  class WikiCloth
16
16
 
@@ -73,8 +73,8 @@ class WikiClothTest < ActiveSupport::TestCase
73
73
  assert data =~ /ul/
74
74
  count = 0
75
75
  # should == 6.. 3 <li>'s and 3 </li>'s
76
- data.gsub(/li/) { |ret|
77
- count += 1
76
+ data.gsub(/li/) { |ret|
77
+ count += 1
78
78
  ret
79
79
  }
80
80
  assert count == 6
@@ -118,8 +118,8 @@ class WikiClothTest < ActiveSupport::TestCase
118
118
  assert_equal data, "<p>\n<h1><span class=\"editsection\">&#91;<a href=\"?section=Hallo\" target=\"_blank\" class=\"exlink\">edit</a>&#93;</span> <span class=\"mw-headline\" id=\"Hallo\">Hallo</span></h1>\n</p>"
119
119
 
120
120
  data = wiki.to_html(:noedit => true)
121
- assert_equal data, "<p>\n<h1> <span class=\"mw-headline\" id=\"Hallo\">Hallo</span></h1>\n</p>"
122
-
121
+ assert_equal data, "<p>\n<h1><span class=\"mw-headline\" id=\"Hallo\">Hallo</span></h1>\n</p>"
122
+
123
123
  end
124
124
 
125
125
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikicloth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 0
10
- version: 0.6.0
9
+ - 1
10
+ version: 0.6.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Ricciardi
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-23 00:00:00 +00:00
18
+ date: 2011-01-04 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency