Skip to content

Commit 0656888

Browse files
sconovertobie
authored andcommitted
more forgiving require formats
1 parent a0181de commit 0656888

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/modulr/js_module.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def inspect
5252
end
5353

5454
def identifier_valid?
55-
@valid ||= terms.all? { |t| t =~ /^([a-zA-Z]+|\.\.?)$/ }
55+
@valid ||= terms.all? { |t| t =~ /^([-_\w]+|\.\.?)$/ }
5656
end
5757

5858
def id

0 commit comments

Comments
 (0)