Skip to content

Commit 4e0b1c3

Browse files
committed
fix literal class doesnt support underscores
1 parent bd380fd commit 4e0b1c3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/template/template.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,15 @@ const RMETemplateResolver = (function() {
255255
}
256256

257257
match = tag.match(/[a-z0-9]+\#[a-zA-Z0-9\-]+/); //find id
258-
if (!Util.isEmpty(match))
258+
if (Util.notEmpty(match))
259259
resolved.setId(match.join().replace(/[a-z0-9]+\#/g, ""));
260260

261-
match = this.cutAttributesIfFound(tag).match(/\.[a-zA-Z-0-9\-]+/g); //find classes
262-
if (!Util.isEmpty(match))
261+
match = this.cutAttributesIfFound(tag).match(/\.[a-zA-Z-0-9_\-]+/g); //find classes
262+
if (Util.notEmpty(match))
263263
resolved.addClasses(match.join(" ").replace(/\./g, ""));
264264

265265
match = tag.match(/\[[a-zA-Z0-9\= \:\(\)\#\-\_\/\.&%@!?£$+¤|;\\<\\>\\{}"]+\]/g); //find attributes
266-
if (!Util.isEmpty(match))
266+
if (Util.notEmpty(match))
267267
resolved = Template.addAttributes(resolved, match);
268268

269269
return resolved;

0 commit comments

Comments
 (0)