lib/rabbit/parser/rd/rd2rabbit-lib.rb in rabbit-1.0.4 vs lib/rabbit/parser/rd/rd2rabbit-lib.rb in rabbit-1.0.5
- old
+ new
@@ -69,11 +69,11 @@
mode = :display
when TitleSlide
target = content
@canvas << content
mode = :display
- when SlidePropertySetter
+ when SlidePropertySetter, NoteSetter
target = content
mode = :property
else
case mode
when :display
@@ -100,11 +100,15 @@
end
@foot_texts << []
@slides << @slide
@slide
when 2
- SlidePropertySetter.new(slide)
+ if /\Anote\z/i =~ title.first.text
+ NoteSetter.new(@slides.last)
+ else
+ SlidePropertySetter.new(@slides.last)
+ end
else
nil
end
end
@@ -406,23 +410,9 @@
while ft_info = current_foot_texts.shift
ft, num = ft_info
ftb << apply_to_Foottext(@footnotes[num], ft)
end
slide << ftb
- end
- end
-
- class SlidePropertySetter
- def initialize(slide)
- @slide = slide
- end
-
- def apply(element)
- return unless element.is_a?(Element::DescriptionList)
- element.each do |item|
- name = Parser.normalize_property_name(item.term.text)
- @slide[name] = item.content.text.strip
- end
end
end
end
end
end