wikitext 1.1.1 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/wikitext/nil_class.rb +22 -0
- data/lib/wikitext/rails.rb +1 -2
- data/lib/wikitext/string.rb +0 -4
- data/lib/wikitext/version.rb +1 -1
- metadata +3 -2
@@ -0,0 +1,22 @@
|
|
1
|
+
# Copyright 2008 Wincent Colaiuta
|
2
|
+
# This program is free software: you can redistribute it and/or modify
|
3
|
+
# it under the terms of the GNU General Public License as published by
|
4
|
+
# the Free Software Foundation, either version 3 of the License, or
|
5
|
+
# (at your option) any later version.
|
6
|
+
#
|
7
|
+
# This program is distributed in the hope that it will be useful,
|
8
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
10
|
+
# GNU General Public License for more details.
|
11
|
+
#
|
12
|
+
# You should have received a copy of the GNU General Public License
|
13
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
14
|
+
|
15
|
+
require 'wikitext'
|
16
|
+
|
17
|
+
class NilClass
|
18
|
+
def to_wikitext
|
19
|
+
''
|
20
|
+
end
|
21
|
+
alias :w :to_wikitext
|
22
|
+
end
|
data/lib/wikitext/rails.rb
CHANGED
data/lib/wikitext/string.rb
CHANGED
@@ -15,13 +15,10 @@
|
|
15
15
|
require 'wikitext'
|
16
16
|
|
17
17
|
class String
|
18
|
-
|
19
18
|
def to_wikitext
|
20
19
|
@@shared_wikitext_parser ||= Wikitext::Parser.new(:space_to_underscore => true)
|
21
20
|
@@shared_wikitext_parser.parse wikitext_preprocess
|
22
21
|
end
|
23
|
-
|
24
|
-
# Convenience shortcut
|
25
22
|
alias :w :to_wikitext
|
26
23
|
|
27
24
|
private
|
@@ -31,5 +28,4 @@ private
|
|
31
28
|
def wikitext_preprocess
|
32
29
|
gsub /\b(bug|issue|request|ticket) #(\d+)/i, '[[issues/\2|\1 #\2]]'
|
33
30
|
end
|
34
|
-
|
35
31
|
end
|
data/lib/wikitext/version.rb
CHANGED
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.
|
4
|
+
version: "1.2"
|
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: 2008-
|
12
|
+
date: 2008-09-10 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- ext/wikitext.h
|
69
69
|
- ext/wikitext_ragel.h
|
70
70
|
- ext/depend
|
71
|
+
- lib/wikitext/nil_class.rb
|
71
72
|
- lib/wikitext/rails.rb
|
72
73
|
- lib/wikitext/string.rb
|
73
74
|
- lib/wikitext/version.rb
|