Module: Rabbit::Parser
- Includes:
- GetText
- Defined in:
- lib/rabbit/parser.rb,
lib/rabbit/parser/rd.rb,
lib/rabbit/parser/rd.rb,
lib/rabbit/parser/pdf.rb,
lib/rabbit/parser/base.rb,
lib/rabbit/parser/wiki.rb,
lib/rabbit/parser/wiki.rb,
lib/rabbit/parser/image.rb,
lib/rabbit/parser/ext/tex.rb,
lib/rabbit/parser/markdown.rb,
lib/rabbit/parser/markdown.rb,
lib/rabbit/parser/ext/emacs.rb,
lib/rabbit/parser/ext/image.rb,
lib/rabbit/parser/ext/rouge.rb,
lib/rabbit/parser/ext/video.rb,
lib/rabbit/parser/ext/entity.rb,
lib/rabbit/parser/ext/escape.rb,
lib/rabbit/parser/ext/inline.rb,
lib/rabbit/parser/rd/visitor.rb,
lib/rabbit/parser/ext/coderay.rb,
lib/rabbit/parser/rd/ext/base.rb,
lib/rabbit/parser/wiki/output.rb,
lib/rabbit/parser/ext/aafigure.rb,
lib/rabbit/parser/ext/enscript.rb,
lib/rabbit/parser/rd/ext/image.rb,
lib/rabbit/parser/rd/ext/refer.rb,
lib/rabbit/parser/rd/ext/video.rb,
lib/rabbit/parser/ext/blockdiag.rb,
lib/rabbit/parser/pause-support.rb,
lib/rabbit/parser/rd/rd2rabbit-lib.rb,
lib/rabbit/parser/rd/rd2rabbit-lib.rb,
lib/rabbit/parser/markdown/converter.rb,
lib/rabbit/parser/rd/ext/block-verbatim.rb,
lib/rabbit/parser/rd/ext/inline-verbatim.rb,
lib/rabbit/parser/rd/ext/character-reference.rb
Defined Under Namespace
Modules: Ext, PauseSupport
Classes: Base, Image, Markdown, NoteSetter, PDF, RD, SlidePropertySetter, Wiki
Constant Summary
Constants included
from GetText
GetText::DOMAIN
Class Method Summary
collapse
Methods included from GetText
included
Class Method Details
.normalize_property_name(name) ⇒ Object
41
42
43
|
# File 'lib/rabbit/parser.rb', line 41
def normalize_property_name(name)
name.gsub(/_/, "-").strip
end
|
.parse(canvas, source) ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/rabbit/parser.rb', line 28
def parse(canvas, source)
parser = Base.find_loader(source)
if parser.nil?
format = _("unsupported format. (supported: %s)")
format_names = Base.loaders.collect do |loader|
loader.format_name
end
message = format % "[#{format_names.join(', ')}]"
raise UnsupportedFormatError.new(message)
end
parser.new(canvas, source).parse
end
|