module BetterHtml::BetterErb::RuntimeChecks
def check_attribute_name(type, start, stop, line, column)
def check_attribute_name(type, start, stop, line, column) text = @parser.document[start...stop] return if @config.partial_attribute_name_pattern.match?(text) s = +"Invalid attribute name #{text.inspect} does not match " \ "regular expression #{@config.partial_attribute_name_pattern.inspect}\n" s << build_location(line, column, text.size) raise BetterHtml::HtmlError, s end