165
166
167
168
169
170
171
172
173
174
175
176
|
# File 'lib/asciidoctor/standoc/macros.rb', line 165
def process document
(document.find_by context: :paragraph).each do |para|
next unless /^TODO: /.match para.lines[0]
parent = para.parent
para.set_attr("name", "todo")
para.set_attr("caption", "TODO")
para.lines[0].sub!(/^TODO: /, "")
todo = Block.new parent, :admonition, attributes: para.attributes,
source: para.lines, content_model: :compound
parent.blocks[parent.blocks.index(para)] = todo
end
end
|