Skip to content

Commit

Permalink
better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlarsen committed Apr 16, 2010
1 parent e67d88e commit e5d028f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hobo/lib/hobo/dryml/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def inside_def_for_type?


def call_name(el)
dryml_exception("invalid tag name", el) unless el.dryml_name =~ /^#{DRYML_NAME}(\.#{DRYML_NAME})*$/
dryml_exception("invalid tag name (remember to use '-' rather than '_')", el) unless el.dryml_name =~ /^#{DRYML_NAME}(\.#{DRYML_NAME})*$/

name = Hobo::Dryml.unreserve(ruby_name(el.dryml_name))
if call_to_self_from_type_specific_def?(el)
Expand Down Expand Up @@ -793,7 +793,7 @@ def field_shorthand_element?(el)
def tag_attributes(el)
attributes = el.attributes
items = attributes.map do |n,v|
dryml_exception("invalid attribute name '#{n}'", el) unless n =~ DRYML_NAME_RX
dryml_exception("invalid attribute name '#{n}' (remember to use '-' rather than '_')", el) unless n =~ DRYML_NAME_RX

next if n.in?(SPECIAL_ATTRIBUTES) || n =~ /^without-/
next if el.attributes['part'] && n == 'id' # The id is rendered on the <div class="part-wrapper"> instead
Expand Down

0 comments on commit e5d028f

Please sign in to comment.