File tree 2 files changed +0
-31
lines changed
test/unit/modules/compiler
2 files changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,7 @@ const decodeHTMLCached = cached(decodeHTML)
30
30
let warn
31
31
let platformGetTagNamespace
32
32
let platformMustUseProp
33
- let preTransforms
34
33
let transforms
35
- let postTransforms
36
34
let delimiters
37
35
38
36
/**
@@ -45,9 +43,7 @@ export function parse (
45
43
warn = options . warn || baseWarn
46
44
platformGetTagNamespace = options . getTagNamespace || no
47
45
platformMustUseProp = options . mustUseProp || no
48
- preTransforms = pluckModuleFunction ( options . modules , 'preTransformNode' )
49
46
transforms = pluckModuleFunction ( options . modules , 'transformNode' )
50
- postTransforms = pluckModuleFunction ( options . modules , 'postTransformNode' )
51
47
delimiters = options . delimiters
52
48
const stack = [ ]
53
49
const preserveWhitespace = options . preserveWhitespace !== false
@@ -90,11 +86,6 @@ export function parse (
90
86
)
91
87
}
92
88
93
- // apply pre-transforms
94
- for ( let i = 0 ; i < preTransforms . length ; i ++ ) {
95
- preTransforms [ i ] ( element , options )
96
- }
97
-
98
89
if ( ! inPre ) {
99
90
processPre ( element )
100
91
if ( element . pre ) {
@@ -158,10 +149,6 @@ export function parse (
158
149
currentParent = element
159
150
stack . push ( element )
160
151
}
161
- // apply post-transforms
162
- for ( let i = 0 ; i < postTransforms . length ; i ++ ) {
163
- postTransforms [ i ] ( element , options )
164
- }
165
152
} ,
166
153
167
154
end ( ) {
Original file line number Diff line number Diff line change @@ -292,22 +292,4 @@ describe('parser', () => {
292
292
const ast = parse ( '<input type="text" name="field1" :value="msg">' , options )
293
293
expect ( ast . props ) . toBeUndefined ( )
294
294
} )
295
-
296
- it ( 'pre/post transforms' , ( ) => {
297
- const options = extend ( { } , baseOptions )
298
- const spy1 = jasmine . createSpy ( 'preTransform' )
299
- const spy2 = jasmine . createSpy ( 'postTransform' )
300
- options . modules = options . modules . concat ( [ {
301
- preTransformNode ( el ) {
302
- spy1 ( el . tag )
303
- } ,
304
- postTransformNode ( el ) {
305
- expect ( el . staticAttrs . length ) . toBe ( 1 )
306
- spy2 ( el . tag )
307
- }
308
- } ] )
309
- parse ( '<img v-pre src="hi">' , options )
310
- expect ( spy1 ) . toHaveBeenCalledWith ( 'img' )
311
- expect ( spy2 ) . toHaveBeenCalledWith ( 'img' )
312
- } )
313
295
} )
You can’t perform that action at this time.
0 commit comments