Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 7471ceb

Browse files
committed
x-strings are a little more clear
1 parent 9a40e91 commit 7471ceb

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/react/top_level.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,24 @@ module React
3737

3838
def self.html_tag?(name)
3939
tags = HTML_TAGS
40-
`
41-
for(var i = 0; i < tags.length; i++){
42-
if(tags[i] === name)
43-
return true;
40+
%x{
41+
for(var i = 0; i < tags.length; i++) {
42+
if(tags[i] === name)
43+
return true;
44+
}
45+
return false;
4446
}
45-
return false;
46-
`
4747
end
4848

4949
def self.html_attr?(name)
5050
attrs = ATTRIBUTES
51-
`
52-
for(var i = 0; i < attrs.length; i++){
53-
if(attrs[i] === name)
54-
return true;
51+
%x{
52+
for(var i = 0; i < attrs.length; i++) {
53+
if(attrs[i] === name)
54+
return true;
55+
}
56+
return false;
5557
}
56-
return false;
57-
`
5858
end
5959

6060
def self.create_element(type, properties = {}, &block)

0 commit comments

Comments
 (0)