Skip to content

Commit

Permalink
Further fix for #3
Browse files Browse the repository at this point in the history
  • Loading branch information
foxdonut committed Jul 31, 2018
1 parent 202d78a commit 4adfe01
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "seview",
"version": "0.8.0",
"version": "0.9.0",
"description": "S-Expression View",
"main": "dist/seview.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const set = (object, path, value) => {
// Credit: JSnoX https://github.com/af/JSnoX/blob/master/jsnox.js

// matches "input", "input:text"
const tagTypeRegex = /^([A-Za-z1-6-]+)(?::([a-z]+))?/
const tagTypeRegex = /^([A-Za-z0-9-]+)(?::([a-z]+))?/

// matches "#id", ".class", "[name=value]", "[required]"
const propsRegex = /((?:#|\.|@)[\w-]+)|(\[.*?\])/g
Expand Down
7 changes: 7 additions & 0 deletions test/util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,13 @@ export default {
attrs: { id: "home" }
}
],
customTag: [
getTagProperties("my-tag09.home"),
{
tag: "my-tag09",
attrs: { className: "home" }
}
],
all: [
getTagProperties("input:password#duck.quack.yellow[name=pwd][required]"),
{
Expand Down

0 comments on commit 4adfe01

Please sign in to comment.