# File lib/asciidoctor/substitutors.rb, line 1063
  def sub_callouts(text)
    # FIXME cache this dynamic regex
    callout_rx = (attr? 'line-comment') ? /(?:#{::Regexp.escape(attr 'line-comment')} )?#{CalloutSourceRxt}/ : CalloutSourceRx
    text.gsub(callout_rx) {
      if $1
        # we have to use sub since we aren't sure it's the first char
        next $&.sub(RS, '')
      end
      Inline.new(self, :callout, $3, :id => @document.callouts.read_next_id).convert
    }
  end