131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
# File 'lib/asciidoctor/standoc/macros.rb', line 131
def process(parent, target, attributes)
rpbegin = '('
rpend = ')'
if attributes.size == 1 and attributes.key?("text")
rt = attributes["text"]
elsif attributes.size == 2 and attributes.key?(1) and
attributes.key?("rpbegin")
rt = attributes[1] || ""
else
rpbegin = attributes['rpbegin']
rt = attributes['rt']
rpend = attributes['rpend']
end
"<ruby>#{target}<rp>#{rpbegin}</rp><rt>#{rt}</rt>"\
"<rp>#{rpend}</rp></ruby>"
end
|