Skip to content

Commit d0241f2

Browse files
committed
use #= instead of .= for literal directives
1 parent 534e12d commit d0241f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/compiler/compile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ function compileDirectives (attrs, options) {
556556
dirName = name.slice(config.prefix.length)
557557

558558
// check literal
559-
if (dirName.charAt(dirName.length - 1) === '.') {
559+
if (dirName.charAt(dirName.length - 1) === '#') {
560560
isLiteral = true
561561
dirName = dirName.slice(0, -1)
562562
} else {

test/unit/specs/compiler/compile_spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if (_.inBrowser) {
4949

5050
it('normal directives', function () {
5151
el.setAttribute('v-a', 'b')
52-
el.innerHTML = '<p v-a="a" v-b="1">hello</p><div v-b.="hi"></div>'
52+
el.innerHTML = '<p v-a="a" v-b="1">hello</p><div v-b#="hi"></div>'
5353
var defA = { priority: 1 }
5454
var defB = { priority: 2 }
5555
var options = _.mergeOptions(Vue.options, {

0 commit comments

Comments
 (0)