def self.parse_block_metadata_line(reader, parent, attributes, options = {})
return false if !reader.has_more_lines?
next_line = reader.peek_line
if (commentish = next_line.start_with?('//')) && (match = next_line.match(REGEXP[:comment_blk]))
terminator = match[0]
reader.grab_lines_until(:skip_first_line => true, :preserve_last_line => true, :terminator => terminator, :preprocess => false)
elsif commentish && next_line.match(REGEXP[:comment])
elsif !options[:text] && (match = next_line.match(REGEXP[:attr_entry]))
process_attribute_entry(reader, parent, attributes, match)
elsif match = next_line.match(REGEXP[:anchor])
id, reftext = match[1].split(',')
attributes['id'] = id
if reftext
attributes['reftext'] = reftext
parent.document.register(:ids, [id, reftext])
end
elsif match = next_line.match(REGEXP[:blk_attr_list])
parent.document.parse_attributes(match[1], [], :sub_input => true, :into => attributes)
elsif !options[:text] && (match = next_line.match(REGEXP[:blk_title]))
attributes['title'] = match[1]
else
return false
end
true
end