File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ var componentDef = require('../directives/component')
12
12
var bindRE = / ^ : | ^ v - b i n d : /
13
13
var onRE = / ^ @ /
14
14
var argRE = / : ( .* ) $ /
15
+ var literalRE = / \. l i t e r a l $ /
15
16
16
17
// terminal directives
17
18
var terminalDirectives = [
@@ -563,9 +564,9 @@ function compileDirectives (attrs, options) {
563
564
// Core directive
564
565
if ( name . indexOf ( config . prefix ) === 0 ) {
565
566
// check literal
566
- if ( name . charAt ( name . length - 1 ) === '#' ) {
567
+ if ( literalRE . test ( name ) ) {
567
568
isLiteral = true
568
- name = name . slice ( 0 , - 1 )
569
+ name = name . replace ( literalRE , '' )
569
570
} else {
570
571
isLiteral = false
571
572
}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ if (_.inBrowser) {
50
50
51
51
it ( 'normal directives' , function ( ) {
52
52
el . setAttribute ( 'v-a' , 'b' )
53
- el . innerHTML = '<p v-a="a" v-b="b">hello</p><div v-b# ="b"></div>'
53
+ el . innerHTML = '<p v-a="a" v-b="b">hello</p><div v-b.literal ="b"></div>'
54
54
var defA = { priority : 1 }
55
55
var defB = { priority : 2 }
56
56
var descriptorA = dirParser . parse ( 'a' ) [ 0 ]
You can’t perform that action at this time.
0 commit comments