Skip to content

Commit 0c09c5f

Browse files
committed
improve literal value regex
1 parent 91e4d47 commit 0c09c5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/compile-props.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var propBindingModes = require('../config')._propBindingModes
88
var identRE = require('../parsers/path').identRE
99
var dataAttrRE = /^data-/
1010
var settablePathRE = /^[A-Za-z_$][\w$]*(\.[A-Za-z_$][\w$]*|\[[^\[\]]+\])*$/
11-
var literalValueRE = /^(true|false)$|^\d.*/
11+
var literalValueRE = /^\s?(true|false|[\d\.]+|'[^']*'|"[^"]*")\s?$/
1212

1313
/**
1414
* Compile props on a root element and return

0 commit comments

Comments
 (0)