def self.is_delimited_block?(line, return_match_data = false)
line_len = line.length
if line_len > 2
if line_len == 3
tip = line.chop
tl = 2
else
tip = line[0..3]
tl = 4
if COMPLIANCE[:markdown_syntax]
tip_alt = tip.chop
if tip_alt == '```' || tip_alt == '~~~'
tip = tip_alt
tl = 3
end
end
end
if DELIMITED_BLOCKS.has_key? tip
if tl == line_len - 1
if return_match_data
context, masq = *DELIMITED_BLOCKS[tip]
BlockMatchData.new(context, masq, tip, tip)
else
true
end
elsif match = line.match(REGEXP[:any_blk])
if return_match_data
context, masq = *DELIMITED_BLOCKS[tip]
BlockMatchData.new(context, masq, tip, match[0])
else
true
end
else
nil
end
else
nil
end
else
nil
end
end