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) && attributes.key?("text")
rt = attributes["text"]
elsif (attributes.size == 2) && attributes.key?(1) &&
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
|