File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ function Compiler (vm, options) {
4949
5050 // initialize element
5151 var el = compiler . el = compiler . setupElement ( options )
52- log ( '\nnew VM instance:' , el . tagName , '\n' )
52+ log ( '\nnew VM instance: ' + el . tagName + '\n' )
5353
5454 // set compiler properties
5555 compiler . vm = el . vue_vm = vm
@@ -399,7 +399,7 @@ CompilerProto.compile = function (node, root) {
399399 compiler . compileNode ( node )
400400 }
401401
402- } else if ( nodeType === 3 ) { // text node
402+ } else if ( nodeType === 3 && config . interpolate ) { // text node
403403
404404 compiler . compileTextNode ( node )
405405
@@ -438,7 +438,7 @@ CompilerProto.compileNode = function (node) {
438438 this . bindDirective ( directive )
439439 }
440440 }
441- } else {
441+ } else if ( config . interpolate ) {
442442 // non directive attribute, check interpolation tags
443443 exp = TextParser . parseAttr ( attr . value )
444444 if ( exp ) {
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ var prefix = 'v',
1717 silent : false ,
1818 enterClass : 'v-enter' ,
1919 leaveClass : 'v-leave' ,
20+ interpolate : true ,
2021 attrs : { } ,
2122
2223 get prefix ( ) {
Original file line number Diff line number Diff line change 11var config = require ( './config' ) ,
22 attrs = config . attrs ,
33 toString = ( { } ) . toString ,
4- join = [ ] . join ,
54 win = window ,
65 console = win . console ,
76 timeout = win . setTimeout ,
@@ -167,21 +166,21 @@ var utils = module.exports = {
167166 /**
168167 * log for debugging
169168 */
170- log : function ( ) {
169+ log : function ( msg ) {
171170 if ( config . debug && console ) {
172- console . log ( join . call ( arguments , ' ' ) )
171+ console . log ( msg )
173172 }
174173 } ,
175174
176175 /**
177176 * warnings, traces by default
178177 * can be suppressed by `silent` option.
179178 */
180- warn : function ( ) {
179+ warn : function ( msg ) {
181180 if ( ! config . silent && console ) {
182- console . warn ( join . call ( arguments , ' ' ) )
183- if ( config . debug ) {
184- console . trace ( )
181+ console . warn ( msg )
182+ if ( config . debug && console . trace ) {
183+ console . trace ( msg )
185184 }
186185 }
187186 } ,
You can’t perform that action at this time.
0 commit comments