rabbit 2.1.6 → 2.1.7

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.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/data/locale/ja/LC_MESSAGES/rabbit.mo +0 -0
  3. data/doc/_config.yml +2 -2
  4. data/doc/_layouts/en.html +1 -1
  5. data/doc/_layouts/ja.html +1 -1
  6. data/doc/_layouts/skeleton.html +22 -17
  7. data/doc/css/rabbit.css +62 -4
  8. data/doc/en/development.rd +2 -2
  9. data/doc/en/news.rd +65 -2
  10. data/doc/index.html.en +15 -15
  11. data/doc/index.html.ja +20 -20
  12. data/doc/ja/development.rd +2 -2
  13. data/doc/ja/index.rd +4 -4
  14. data/doc/ja/news.rd +61 -2
  15. data/lib/rabbit/command/rabbit.rb +7 -62
  16. data/lib/rabbit/cursor-manager.rb +29 -22
  17. data/lib/rabbit/element/index-slide.rb +1 -1
  18. data/lib/rabbit/error.rb +224 -0
  19. data/lib/rabbit/frame.rb +6 -10
  20. data/lib/rabbit/graffiti/config-dialog.rb +4 -4
  21. data/lib/rabbit/gtk.rb +173 -3
  22. data/lib/rabbit/image/pdf.rb +1 -3
  23. data/lib/rabbit/image/svg.rb +1 -3
  24. data/lib/rabbit/info-window.rb +37 -30
  25. data/lib/rabbit/keys.rb +70 -70
  26. data/lib/rabbit/logger/gui.rb +3 -10
  27. data/lib/rabbit/menu.rb +22 -8
  28. data/lib/rabbit/parser.rb +4 -2
  29. data/lib/rabbit/parser/base.rb +0 -6
  30. data/lib/rabbit/parser/image.rb +4 -0
  31. data/lib/rabbit/parser/markdown.rb +33 -7
  32. data/lib/rabbit/parser/markdown/converter.rb +15 -4
  33. data/lib/rabbit/parser/pdf.rb +4 -0
  34. data/lib/rabbit/parser/rd.rb +4 -0
  35. data/lib/rabbit/parser/rd/ext/block-verbatim.rb +47 -34
  36. data/lib/rabbit/parser/wiki.rb +4 -0
  37. data/lib/rabbit/parser/wiki/output.rb +42 -15
  38. data/lib/rabbit/progress.rb +1 -1
  39. data/lib/rabbit/rabbit.rb +8 -225
  40. data/lib/rabbit/renderer/base.rb +1 -1
  41. data/lib/rabbit/renderer/display/base.rb +10 -3
  42. data/lib/rabbit/renderer/display/button-handler.rb +3 -3
  43. data/lib/rabbit/renderer/display/clutter-embed.rb +9 -9
  44. data/lib/rabbit/renderer/display/drawing-area-base.rb +19 -24
  45. data/lib/rabbit/renderer/display/drawing-area-primitive.rb +22 -13
  46. data/lib/rabbit/renderer/display/drawing-area-view-only.rb +1 -1
  47. data/lib/rabbit/renderer/display/drawing-area.rb +1 -1
  48. data/lib/rabbit/renderer/display/gesture.rb +1 -1
  49. data/lib/rabbit/renderer/display/key-handler.rb +19 -19
  50. data/lib/rabbit/renderer/display/magnifier.rb +1 -1
  51. data/lib/rabbit/renderer/display/mask.rb +16 -21
  52. data/lib/rabbit/renderer/display/search.rb +1 -1
  53. data/lib/rabbit/renderer/display/spotlight.rb +1 -1
  54. data/lib/rabbit/renderer/engine.rb +1 -18
  55. data/lib/rabbit/renderer/engine/cairo.rb +0 -6
  56. data/lib/rabbit/renderer/pixmap.rb +1 -25
  57. data/lib/rabbit/renderer/pixmap/cairo.rb +1 -9
  58. data/lib/rabbit/renderer/print/cairo.rb +1 -10
  59. data/lib/rabbit/search-window.rb +2 -2
  60. data/lib/rabbit/source-generator/markdown.rb +1 -1
  61. data/lib/rabbit/stock.rb +3 -3
  62. data/lib/rabbit/task/slide.rb +1 -1
  63. data/lib/rabbit/theme/applier.rb +1 -1
  64. data/lib/rabbit/theme/clear-blue/clear-blue.rb +0 -8
  65. data/lib/rabbit/theme/image-slide-number/image-slide-number.rb +7 -5
  66. data/lib/rabbit/theme/image-timer/image-timer.rb +4 -1
  67. data/lib/rabbit/utils.rb +20 -3
  68. data/lib/rabbit/version.rb +1 -1
  69. data/lib/rabbit/video-window.rb +3 -3
  70. data/po/en/rabbit.edit.po +187 -199
  71. data/po/en/rabbit.po +58 -67
  72. data/po/fr/rabbit.edit.po +187 -199
  73. data/po/fr/rabbit.po +58 -67
  74. data/po/ja/rabbit.edit.po +204 -205
  75. data/po/ja/rabbit.po +64 -73
  76. data/rabbit.gemspec +2 -0
  77. data/sample/rabbit-en.md +2 -2
  78. data/sample/rabbit.md +2 -2
  79. data/test/image/test-dia.rb +2 -2
  80. data/test/image/test-eps.rb +2 -2
  81. data/test/parser/test-markdown.rb +71 -25
  82. data/test/parser/test-wiki.rb +73 -0
  83. data/test/rabbit-test-utils.rb +3 -7
  84. data/test/rabbit-test-utils/fixture.rb +24 -0
  85. data/test/rabbit-test-utils/parser.rb +48 -0
  86. data/test/source-generator/test-markdown.rb +1 -1
  87. metadata +37 -7
  88. data/README +0 -1
  89. data/doc/images/jp.png +0 -0
  90. data/doc/images/us.png +0 -0
  91. data/lib/rabbit/renderer/engine/gdk.rb +0 -230
  92. data/lib/rabbit/renderer/pixmap/gdk.rb +0 -29
@@ -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::Window::ModifierType.new
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
@@ -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, nil)
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, Gtk::UIManager::AUTO, false)
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, nil, nil)
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, nil, nil)
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)
@@ -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
- loader_names = Base.loaders.collect {|loader| loader.name}
16
- message = format % "[#{loader_names.join(', ')}]"
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
@@ -5,12 +5,6 @@ module Rabbit
5
5
  class Base
6
6
  extend ModuleLoader
7
7
 
8
- class << self
9
- def name
10
- super.split(/::/).last
11
- end
12
- end
13
-
14
8
  def initialize(canvas, source)
15
9
  @canvas = canvas
16
10
  @source = source
@@ -10,6 +10,10 @@ module Rabbit
10
10
  push_loader(self)
11
11
 
12
12
  class << self
13
+ def format_name
14
+ "image"
15
+ end
16
+
13
17
  def match?(source)
14
18
  options = {
15
19
  :prefix => "image-parser-match",
@@ -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
- case name
13
- when "wait"
14
- @tree.children << Element.new(:wait, body, nil, :category => type, :location => line_no)
15
- true
16
- else
17
- handle_extension_raw(name, opts, body, type, line_no)
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
- if element.children.collect {|child| child.type} == [:img]
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 element.children.any? {|child| child.type == :img}
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
@@ -10,6 +10,10 @@ module Rabbit
10
10
  class PDF < Base
11
11
  unshift_loader(self)
12
12
  class << self
13
+ def format_name
14
+ "PDF"
15
+ end
16
+
13
17
  def match?(source)
14
18
  extension = source.extension
15
19
  if extension.nil?
@@ -16,6 +16,10 @@ module Rabbit
16
16
  class RD
17
17
  push_loader(self)
18
18
  class << self
19
+ def format_name
20
+ "RD"
21
+ end
22
+
19
23
  def match?(source)
20
24
  extension = source.extension
21
25
  if extension.nil?
@@ -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 'rabbit/rabbit'
4
- require 'rabbit/utils'
5
- begin
6
- require 'rabbit/parser/rd/rt/rt2rabbit-lib'
7
- rescue LoadError
8
- end
9
- require 'rabbit/parser/rd/ext/base'
10
- require 'rabbit/parser/rd/ext/image'
11
- require 'rabbit/parser/rd/ext/video'
12
- require 'rabbit/parser/ext/enscript'
13
- require 'rabbit/parser/ext/tex'
14
- require 'rabbit/parser/ext/aafigure'
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 /^_$/i =~ label
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 /^(?:image|img)$/i =~ label
53
+ return nil unless /\A(?:image|img)\z/i =~ label
41
54
  src, prop = parse_source(source)
42
- return nil if prop['src'].nil?
55
+ return nil if prop["src"].nil?
43
56
 
44
- if prop['align'] == "right"
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['src'], 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 /^video$/i =~ label
79
+ return nil unless /\Avideo\z/i =~ label
67
80
  src, prop = parse_source(source)
68
- return nil if prop['src'].nil?
81
+ return nil if prop["src"].nil?
69
82
 
70
- make_video(visitor, prop['src'], 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 /^enscript (\w+)$/i =~ label
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 /^LaTeX$/i =~ label
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 /^mimeTeX$/i =~ label
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 /^aafigure$/i =~ label
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 /^blockdiag$/i =~ label
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 /^coderay (\w+)$/i =~ label
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 /^emacs(?:\s+(.+))?$/i =~ label
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 /^rt$/i =~ label
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 /^block[_-]?quote$/i =~ label
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 /^wait$/i =~ label
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")