wikicloth 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/wikicloth/section.rb +2 -2
- data/lib/wikicloth/wiki_buffer/var.rb +2 -1
- data/lib/wikicloth.rb +1 -1
- data/test/wiki_cloth_test.rb +4 -4
- metadata +4 -4
data/lib/wikicloth/section.rb
CHANGED
@@ -74,8 +74,8 @@ module WikiCloth
|
|
74
74
|
else
|
75
75
|
ret = "<h#{self.depth}>" + (options[:noedit] == true ? "" :
|
76
76
|
"<span class=\"editsection\">[<a href=\"" + options[:link_handler].section_link(self.id) +
|
77
|
-
"\" title=\"Edit section: #{self.title}\">edit</a>]</span>") +
|
78
|
-
"
|
77
|
+
"\" title=\"Edit section: #{self.title}\">edit</a>]</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
|
-
|
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
data/test/wiki_cloth_test.rb
CHANGED
@@ -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\">[<a href=\"?section=Hallo\" target=\"_blank\" class=\"exlink\">edit</a>]</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
|
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:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
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:
|
18
|
+
date: 2011-01-04 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|