rabbit 2.1.6 → 2.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/locale/ja/LC_MESSAGES/rabbit.mo +0 -0
- data/doc/_config.yml +2 -2
- data/doc/_layouts/en.html +1 -1
- data/doc/_layouts/ja.html +1 -1
- data/doc/_layouts/skeleton.html +22 -17
- data/doc/css/rabbit.css +62 -4
- data/doc/en/development.rd +2 -2
- data/doc/en/news.rd +65 -2
- data/doc/index.html.en +15 -15
- data/doc/index.html.ja +20 -20
- data/doc/ja/development.rd +2 -2
- data/doc/ja/index.rd +4 -4
- data/doc/ja/news.rd +61 -2
- data/lib/rabbit/command/rabbit.rb +7 -62
- data/lib/rabbit/cursor-manager.rb +29 -22
- data/lib/rabbit/element/index-slide.rb +1 -1
- data/lib/rabbit/error.rb +224 -0
- data/lib/rabbit/frame.rb +6 -10
- data/lib/rabbit/graffiti/config-dialog.rb +4 -4
- data/lib/rabbit/gtk.rb +173 -3
- data/lib/rabbit/image/pdf.rb +1 -3
- data/lib/rabbit/image/svg.rb +1 -3
- data/lib/rabbit/info-window.rb +37 -30
- data/lib/rabbit/keys.rb +70 -70
- data/lib/rabbit/logger/gui.rb +3 -10
- data/lib/rabbit/menu.rb +22 -8
- data/lib/rabbit/parser.rb +4 -2
- data/lib/rabbit/parser/base.rb +0 -6
- data/lib/rabbit/parser/image.rb +4 -0
- data/lib/rabbit/parser/markdown.rb +33 -7
- data/lib/rabbit/parser/markdown/converter.rb +15 -4
- data/lib/rabbit/parser/pdf.rb +4 -0
- data/lib/rabbit/parser/rd.rb +4 -0
- data/lib/rabbit/parser/rd/ext/block-verbatim.rb +47 -34
- data/lib/rabbit/parser/wiki.rb +4 -0
- data/lib/rabbit/parser/wiki/output.rb +42 -15
- data/lib/rabbit/progress.rb +1 -1
- data/lib/rabbit/rabbit.rb +8 -225
- data/lib/rabbit/renderer/base.rb +1 -1
- data/lib/rabbit/renderer/display/base.rb +10 -3
- data/lib/rabbit/renderer/display/button-handler.rb +3 -3
- data/lib/rabbit/renderer/display/clutter-embed.rb +9 -9
- data/lib/rabbit/renderer/display/drawing-area-base.rb +19 -24
- data/lib/rabbit/renderer/display/drawing-area-primitive.rb +22 -13
- data/lib/rabbit/renderer/display/drawing-area-view-only.rb +1 -1
- data/lib/rabbit/renderer/display/drawing-area.rb +1 -1
- data/lib/rabbit/renderer/display/gesture.rb +1 -1
- data/lib/rabbit/renderer/display/key-handler.rb +19 -19
- data/lib/rabbit/renderer/display/magnifier.rb +1 -1
- data/lib/rabbit/renderer/display/mask.rb +16 -21
- data/lib/rabbit/renderer/display/search.rb +1 -1
- data/lib/rabbit/renderer/display/spotlight.rb +1 -1
- data/lib/rabbit/renderer/engine.rb +1 -18
- data/lib/rabbit/renderer/engine/cairo.rb +0 -6
- data/lib/rabbit/renderer/pixmap.rb +1 -25
- data/lib/rabbit/renderer/pixmap/cairo.rb +1 -9
- data/lib/rabbit/renderer/print/cairo.rb +1 -10
- data/lib/rabbit/search-window.rb +2 -2
- data/lib/rabbit/source-generator/markdown.rb +1 -1
- data/lib/rabbit/stock.rb +3 -3
- data/lib/rabbit/task/slide.rb +1 -1
- data/lib/rabbit/theme/applier.rb +1 -1
- data/lib/rabbit/theme/clear-blue/clear-blue.rb +0 -8
- data/lib/rabbit/theme/image-slide-number/image-slide-number.rb +7 -5
- data/lib/rabbit/theme/image-timer/image-timer.rb +4 -1
- data/lib/rabbit/utils.rb +20 -3
- data/lib/rabbit/version.rb +1 -1
- data/lib/rabbit/video-window.rb +3 -3
- data/po/en/rabbit.edit.po +187 -199
- data/po/en/rabbit.po +58 -67
- data/po/fr/rabbit.edit.po +187 -199
- data/po/fr/rabbit.po +58 -67
- data/po/ja/rabbit.edit.po +204 -205
- data/po/ja/rabbit.po +64 -73
- data/rabbit.gemspec +2 -0
- data/sample/rabbit-en.md +2 -2
- data/sample/rabbit.md +2 -2
- data/test/image/test-dia.rb +2 -2
- data/test/image/test-eps.rb +2 -2
- data/test/parser/test-markdown.rb +71 -25
- data/test/parser/test-wiki.rb +73 -0
- data/test/rabbit-test-utils.rb +3 -7
- data/test/rabbit-test-utils/fixture.rb +24 -0
- data/test/rabbit-test-utils/parser.rb +48 -0
- data/test/source-generator/test-markdown.rb +1 -1
- metadata +37 -7
- data/README +0 -1
- data/doc/images/jp.png +0 -0
- data/doc/images/us.png +0 -0
- data/lib/rabbit/renderer/engine/gdk.rb +0 -230
- data/lib/rabbit/renderer/pixmap/gdk.rb +0 -29
data/lib/rabbit/logger/gui.rb
CHANGED
@@ -78,15 +78,15 @@ module Rabbit
|
|
78
78
|
@dialog = Gtk::Dialog.new(title, nil, flags, *buttons)
|
79
79
|
@dialog.vbox.add(init_buffer)
|
80
80
|
@dialog.set_default_size(width, height)
|
81
|
+
@dialog.title = title
|
81
82
|
set_dialog_delete
|
82
83
|
set_dialog_response
|
83
|
-
set_dialog_expose_event
|
84
84
|
set_dialog_accel_group
|
85
85
|
end
|
86
86
|
|
87
87
|
def set_dialog_delete
|
88
88
|
@dialog.signal_connect("destroy") do |widget, event|
|
89
|
-
exit if @current_severity >= FATAL
|
89
|
+
exit if @current_severity >= Severity::FATAL
|
90
90
|
true
|
91
91
|
end
|
92
92
|
end
|
@@ -103,16 +103,9 @@ module Rabbit
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
-
def set_dialog_expose_event
|
107
|
-
@dialog.signal_connect("expose_event") do |widget, event|
|
108
|
-
@dialog.title = title
|
109
|
-
false
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
106
|
def set_dialog_accel_group
|
114
107
|
accel_group = Gtk::AccelGroup.new
|
115
|
-
mod = Gdk::
|
108
|
+
mod = Gdk::ModifierType.new
|
116
109
|
flags = Gtk::AccelFlags::VISIBLE
|
117
110
|
Keys::QUIT_KEYS.each do |val|
|
118
111
|
accel_group.connect(val, mod, flags) do
|
data/lib/rabbit/menu.rb
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
# Copyright (C) 2004-2015 Kouhei Sutou <kou@cozmixng.org>
|
2
|
+
#
|
3
|
+
# This program is free software; you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation; either version 2 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License along
|
14
|
+
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
16
|
+
|
1
17
|
require "erb"
|
2
18
|
require "stringio"
|
3
19
|
|
@@ -59,7 +75,7 @@ module Rabbit
|
|
59
75
|
name = "JumpTo#{i}"
|
60
76
|
label = "#{i}: #{escape_label(Utils.unescape_title(title))}"
|
61
77
|
tooltip = _("Jump to the %dth slide") % i
|
62
|
-
action = Gtk::Action.new(name, label, tooltip
|
78
|
+
action = Gtk::Action.new(name, :label => label, :tooltip => tooltip)
|
63
79
|
action.signal_connect("activate") do
|
64
80
|
jump_to_action.activate {i}
|
65
81
|
end
|
@@ -86,7 +102,7 @@ module Rabbit
|
|
86
102
|
@jump_to_actions.add_action(action)
|
87
103
|
@jump_to_actions_keeper << action # Workaround for > Ruby/GTK2 0.16
|
88
104
|
@merge.add_ui(@jump_to_merge_id, jump_to_path, action.name,
|
89
|
-
action.name,
|
105
|
+
action.name, :auto, false)
|
90
106
|
end
|
91
107
|
end
|
92
108
|
|
@@ -129,25 +145,23 @@ module Rabbit
|
|
129
145
|
def theme_menu_add_category(prefix, path, category)
|
130
146
|
name = "#{prefix}ThemeCategory#{category}"
|
131
147
|
label = _(category)
|
132
|
-
action = Gtk::Action.new(name, label
|
148
|
+
action = Gtk::Action.new(name, :label => label)
|
133
149
|
@theme_actions.add_action(action)
|
134
|
-
@merge.add_ui(@theme_merge_id, path, category, name,
|
135
|
-
Gtk::UIManager::MENU, false)
|
150
|
+
@merge.add_ui(@theme_merge_id, path, category, name, :menu, false)
|
136
151
|
end
|
137
152
|
|
138
153
|
def theme_menu_add_theme(prefix, path, entry, canvas)
|
139
154
|
path = "#{path}/#{entry.category}"
|
140
155
|
name = "#{prefix}ThemeEntry#{entry.name}"
|
141
156
|
label = _(entry.title)
|
142
|
-
action = Gtk::Action.new(name, label
|
157
|
+
action = Gtk::Action.new(name, :label => label)
|
143
158
|
action.signal_connect("activate") do
|
144
159
|
canvas.activate("#{prefix}Theme") do
|
145
160
|
[entry, Utils.process_pending_events_proc]
|
146
161
|
end
|
147
162
|
end
|
148
163
|
@theme_actions.add_action(action)
|
149
|
-
@merge.add_ui(@theme_merge_id, path, entry.name, name,
|
150
|
-
Gtk::UIManager::AUTO, false)
|
164
|
+
@merge.add_ui(@theme_merge_id, path, entry.name, name, :auto, false)
|
151
165
|
end
|
152
166
|
|
153
167
|
def show_tearoff(sub_menus=@menu.children)
|
data/lib/rabbit/parser.rb
CHANGED
@@ -12,8 +12,10 @@ module Rabbit
|
|
12
12
|
parser = Base.find_loader(source)
|
13
13
|
if parser.nil?
|
14
14
|
format = _("unsupported format. (supported: %s)")
|
15
|
-
|
16
|
-
|
15
|
+
format_names = Base.loaders.collect do |loader|
|
16
|
+
loader.format_name
|
17
|
+
end
|
18
|
+
message = format % "[#{format_names.join(', ')}]"
|
17
19
|
raise UnsupportedFormatError.new(message)
|
18
20
|
end
|
19
21
|
parser.new(canvas, source).parse
|
data/lib/rabbit/parser/base.rb
CHANGED
data/lib/rabbit/parser/image.rb
CHANGED
@@ -9,13 +9,28 @@ module Kramdown
|
|
9
9
|
class Kramdown
|
10
10
|
alias_method :handle_extension_raw, :handle_extension
|
11
11
|
def handle_extension(name, opts, body, type, line_no=nil)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
return true if handle_extension_raw(name, opts, body, type, line_no)
|
13
|
+
element = Element.new(name.to_sym,
|
14
|
+
nil,
|
15
|
+
opts,
|
16
|
+
:category => type,
|
17
|
+
:location => line_no)
|
18
|
+
if body
|
19
|
+
root, warnings = self.class.parse(body, @options)
|
20
|
+
fix_location(root, line_no)
|
21
|
+
if type == :span
|
22
|
+
p_element = root.children.first
|
23
|
+
p_element.children.each do |sub_element|
|
24
|
+
element.children << sub_element
|
25
|
+
end
|
26
|
+
else
|
27
|
+
root.children.each do |sub_element|
|
28
|
+
element.children << sub_element
|
29
|
+
end
|
30
|
+
end
|
18
31
|
end
|
32
|
+
@tree.children << element
|
33
|
+
true
|
19
34
|
end
|
20
35
|
|
21
36
|
alias_method :configure_parser_raw, :configure_parser
|
@@ -40,6 +55,14 @@ module Kramdown
|
|
40
55
|
self.class.const_set(:FENCED_CODEBLOCK_MATCH, original_match)
|
41
56
|
end
|
42
57
|
end
|
58
|
+
|
59
|
+
private
|
60
|
+
def fix_location(element, base_location)
|
61
|
+
element.options[:location] += base_location - 1
|
62
|
+
element.children.each do |sub_element|
|
63
|
+
fix_location(sub_element, base_location)
|
64
|
+
end
|
65
|
+
end
|
43
66
|
end
|
44
67
|
end
|
45
68
|
end
|
@@ -58,12 +81,15 @@ module Rabbit
|
|
58
81
|
class Markdown
|
59
82
|
unshift_loader(self)
|
60
83
|
class << self
|
84
|
+
def format_name
|
85
|
+
"Makrdown"
|
86
|
+
end
|
87
|
+
|
61
88
|
def match?(source)
|
62
89
|
/\A(?:md|markdown)\z/i =~ source.extension.to_s
|
63
90
|
end
|
64
91
|
end
|
65
92
|
|
66
|
-
include Element
|
67
93
|
def parse
|
68
94
|
document = Kramdown::Document.new(@source.read)
|
69
95
|
converter = Converter.new(@canvas)
|
@@ -1,9 +1,11 @@
|
|
1
1
|
require "English"
|
2
2
|
|
3
|
+
require "rabbit/gettext"
|
3
4
|
require "rabbit/parser/pause-support"
|
4
5
|
require "rabbit/parser/ext/blockdiag"
|
5
6
|
require "rabbit/parser/ext/coderay"
|
6
7
|
require "rabbit/parser/ext/escape"
|
8
|
+
require "rabbit/parser/ext/inline"
|
7
9
|
require "rabbit/parser/ext/image"
|
8
10
|
require "rabbit/parser/ext/tex"
|
9
11
|
|
@@ -11,6 +13,7 @@ module Rabbit
|
|
11
13
|
module Parser
|
12
14
|
class Markdown
|
13
15
|
class Converter
|
16
|
+
include GetText
|
14
17
|
include Element
|
15
18
|
include PauseSupport
|
16
19
|
|
@@ -142,15 +145,18 @@ module Rabbit
|
|
142
145
|
end
|
143
146
|
|
144
147
|
def convert_p(element)
|
145
|
-
|
148
|
+
child_types = element.children.collect {|child| child.type}
|
149
|
+
if child_types == [:img]
|
146
150
|
convert_container(element)[0]
|
147
151
|
else
|
148
|
-
if
|
152
|
+
if child_types.include?(:img)
|
149
153
|
raise ParseError,
|
150
154
|
_("multiple ![alt]{image} in a paragraph isn't supported.")
|
151
|
-
else
|
152
|
-
create_paragraph(convert_container(element))
|
153
155
|
end
|
156
|
+
if element.options[:transparent] and child_types == [:text]
|
157
|
+
element.children.first.value.chomp!
|
158
|
+
end
|
159
|
+
create_paragraph(convert_container(element))
|
154
160
|
end
|
155
161
|
end
|
156
162
|
|
@@ -361,6 +367,11 @@ module Rabbit
|
|
361
367
|
def convert_wait(element)
|
362
368
|
WaitTag.new
|
363
369
|
end
|
370
|
+
|
371
|
+
def convert_note(element)
|
372
|
+
# TODO: Should we validate element.options[:category] == "span"?
|
373
|
+
Ext::Inline.note(convert_container(element))
|
374
|
+
end
|
364
375
|
end
|
365
376
|
end
|
366
377
|
end
|
data/lib/rabbit/parser/pdf.rb
CHANGED
data/lib/rabbit/parser/rd.rb
CHANGED
@@ -1,20 +1,33 @@
|
|
1
|
+
# Copyright (C) 2004-2015 Kouhei Sutou <kou@cozmixng.org>
|
2
|
+
#
|
3
|
+
# This program is free software; you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation; either version 2 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License along
|
14
|
+
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
16
|
+
|
1
17
|
require "tempfile"
|
2
18
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
require
|
10
|
-
require
|
11
|
-
require
|
12
|
-
require
|
13
|
-
require
|
14
|
-
require
|
15
|
-
require 'rabbit/parser/ext/blockdiag'
|
16
|
-
require 'rabbit/parser/ext/coderay'
|
17
|
-
require 'rabbit/parser/ext/emacs'
|
19
|
+
require "rabbit/rabbit"
|
20
|
+
require "rabbit/utils"
|
21
|
+
require "rabbit/parser/rd/rt/rt2rabbit-lib"
|
22
|
+
require "rabbit/parser/rd/ext/base"
|
23
|
+
require "rabbit/parser/rd/ext/image"
|
24
|
+
require "rabbit/parser/rd/ext/video"
|
25
|
+
require "rabbit/parser/ext/enscript"
|
26
|
+
require "rabbit/parser/ext/tex"
|
27
|
+
require "rabbit/parser/ext/aafigure"
|
28
|
+
require "rabbit/parser/ext/blockdiag"
|
29
|
+
require "rabbit/parser/ext/coderay"
|
30
|
+
require "rabbit/parser/ext/emacs"
|
18
31
|
|
19
32
|
module Rabbit
|
20
33
|
module Parser
|
@@ -32,23 +45,23 @@ module Rabbit
|
|
32
45
|
end
|
33
46
|
|
34
47
|
def ext_block_verb_quote(label, source, content, visitor)
|
35
|
-
return nil unless
|
48
|
+
return nil unless /\A_\z/i =~ label
|
36
49
|
default_ext_block_verbatim("", source, source, visitor)
|
37
50
|
end
|
38
51
|
|
39
52
|
def ext_block_verb_img(label, source, content, visitor)
|
40
|
-
return nil unless
|
53
|
+
return nil unless /\A(?:image|img)\z/i =~ label
|
41
54
|
src, prop = parse_source(source)
|
42
|
-
return nil if prop[
|
55
|
+
return nil if prop["src"].nil?
|
43
56
|
|
44
|
-
if prop[
|
57
|
+
if prop["align"] == "right"
|
45
58
|
body = visitor.current_body
|
46
59
|
if body["background-image"]
|
47
60
|
raise ParseError,
|
48
61
|
_("multiple 'align = right' isn't supported.")
|
49
62
|
end
|
50
63
|
prop.each do |name, value|
|
51
|
-
name = name.gsub(/_/,
|
64
|
+
name = name.gsub(/_/, "-")
|
52
65
|
if name == "src"
|
53
66
|
property_name = "background-image"
|
54
67
|
else
|
@@ -58,20 +71,20 @@ module Rabbit
|
|
58
71
|
end
|
59
72
|
:no_element
|
60
73
|
else
|
61
|
-
make_image(visitor, prop[
|
74
|
+
make_image(visitor, prop["src"], prop)
|
62
75
|
end
|
63
76
|
end
|
64
77
|
|
65
78
|
def ext_block_verb_video(label, source, content, visitor)
|
66
|
-
return nil unless
|
79
|
+
return nil unless /\Avideo\z/i =~ label
|
67
80
|
src, prop = parse_source(source)
|
68
|
-
return nil if prop[
|
81
|
+
return nil if prop["src"].nil?
|
69
82
|
|
70
|
-
make_video(visitor, prop[
|
83
|
+
make_video(visitor, prop["src"], prop)
|
71
84
|
end
|
72
85
|
|
73
86
|
def ext_block_verb_enscript(label, source, content, visitor)
|
74
|
-
return nil unless
|
87
|
+
return nil unless /\Aenscript (\w+)\z/i =~ label
|
75
88
|
lang = $1.downcase.untaint
|
76
89
|
|
77
90
|
src, prop = parse_source(source)
|
@@ -85,14 +98,14 @@ module Rabbit
|
|
85
98
|
end
|
86
99
|
|
87
100
|
def ext_block_verb_LaTeX(label, source, content, visitor)
|
88
|
-
return nil unless
|
101
|
+
return nil unless /\ALaTeX\z/i =~ label
|
89
102
|
make_image_from_file(source, visitor) do |src_file_path, prop|
|
90
103
|
Parser::Ext::TeX.make_image_by_LaTeX(src_file_path, prop, visitor)
|
91
104
|
end
|
92
105
|
end
|
93
106
|
|
94
107
|
def ext_block_verb_mimeTeX(label, source, content, visitor)
|
95
|
-
return nil unless
|
108
|
+
return nil unless /\AmimeTeX\z/i =~ label
|
96
109
|
make_image_from_file(source, visitor) do |src_file_path, prop|
|
97
110
|
Parser::Ext::TeX.make_image_by_mimeTeX(src_file_path, prop,
|
98
111
|
visitor)
|
@@ -100,21 +113,21 @@ module Rabbit
|
|
100
113
|
end
|
101
114
|
|
102
115
|
def ext_block_verb_aafigure(label, source, content, visitor)
|
103
|
-
return nil unless
|
116
|
+
return nil unless /\Aaafigure\z/i =~ label
|
104
117
|
make_image_from_file(source, visitor) do |src_file_path, prop|
|
105
118
|
Parser::Ext::AAFigure.make_image(src_file_path, prop, visitor)
|
106
119
|
end
|
107
120
|
end
|
108
121
|
|
109
122
|
def ext_block_verb_blockdiag(label, source, content, visitor)
|
110
|
-
return nil unless
|
123
|
+
return nil unless /\Ablockdiag\z/i =~ label
|
111
124
|
make_image_from_file(source, visitor) do |src_file_path, prop|
|
112
125
|
Parser::Ext::BlockDiag.make_image(src_file_path, prop, visitor)
|
113
126
|
end
|
114
127
|
end
|
115
128
|
|
116
129
|
def ext_block_verb_coderay(label, source, content, visitor)
|
117
|
-
return nil unless
|
130
|
+
return nil unless /\Acoderay (\w+)\z/i =~ label
|
118
131
|
lang = $1.downcase.untaint
|
119
132
|
|
120
133
|
src, prop = parse_source(source)
|
@@ -125,7 +138,7 @@ module Rabbit
|
|
125
138
|
end
|
126
139
|
|
127
140
|
def ext_block_verb_emacs(label, source, content, visitor)
|
128
|
-
return nil unless
|
141
|
+
return nil unless /\Aemacs(?:\s+(.+))?\z/i =~ label
|
129
142
|
mode_line = $1.untaint
|
130
143
|
|
131
144
|
src, prop = parse_source(source)
|
@@ -136,7 +149,7 @@ module Rabbit
|
|
136
149
|
end
|
137
150
|
|
138
151
|
def ext_block_verb_rt(label, source, content, visitor)
|
139
|
-
return nil unless
|
152
|
+
return nil unless /\Art\z/i =~ label
|
140
153
|
unless defined?(RT2RabbitVisitor)
|
141
154
|
visitor.logger.warn(_("RTtool isn't available"))
|
142
155
|
return nil
|
@@ -146,7 +159,7 @@ module Rabbit
|
|
146
159
|
end
|
147
160
|
|
148
161
|
def ext_block_verb_block_quote(label, source, content, visitor)
|
149
|
-
return nil unless
|
162
|
+
return nil unless /\Ablock[_-]?quote\z/i =~ label
|
150
163
|
src, prop = parse_source(source)
|
151
164
|
tree = ::RD::RDTree.new("=begin\n#{src}\n=end\n")
|
152
165
|
elems = tree.root.children.collect do |child|
|
@@ -156,7 +169,7 @@ module Rabbit
|
|
156
169
|
end
|
157
170
|
|
158
171
|
def ext_block_verb_wait(label, source, content, visitor)
|
159
|
-
return nil unless
|
172
|
+
return nil unless /\Await\z/i =~ label
|
160
173
|
|
161
174
|
src, prop = parse_source(source)
|
162
175
|
tree = ::RD::RDTree.new("=begin\n#{src}\n=end\n")
|