# File lib/asciidoctor/lexer.rb, line 716
  def self.is_delimited_block?(line, return_match_data = false)
    line_len = line.length
    # optimized for best performance
    if line_len > 2
      if line_len == 3
        tip = line.chop
        tl = 2
      else
        tip = line[0..3]
        tl = 4

        if COMPLIANCE[:markdown_syntax]
          # special case for fenced code blocks
          tip_alt = tip.chop
          if tip_alt == '```' || tip_alt == '~~~'
            tip = tip_alt
            tl = 3
          end
        end
      end

      if DELIMITED_BLOCKS.has_key? tip
        # if tip is the full line
        if tl == line_len - 1
          #return_match_data ? BlockMatchData.new(DELIMITED_BLOCKS[tip], tip, tip) : true
          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])
          #return_match_data ? BlockMatchData.new(DELIMITED_BLOCKS[tip], tip, match[0]) : true
          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