File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ function transformNode (el: ASTElement, options: CompilerOptions) {
12
12
const warn = options . warn || baseWarn
13
13
const staticStyle = getAndRemoveAttr ( el , 'style' )
14
14
if ( staticStyle ) {
15
+ /* istanbul ignore if */
15
16
if ( process . env . NODE_ENV !== 'production' ) {
16
17
const expression = parseText ( staticStyle , options . delimiters )
17
18
if ( expression ) {
Original file line number Diff line number Diff line change 3
3
import { cached , extend , toObject } from 'shared/util'
4
4
5
5
export const parseStyleText = cached ( function ( cssText ) {
6
- const rs = { }
7
- if ( ! cssText ) {
8
- return rs
9
- }
6
+ const res = { }
10
7
const hasBackground = cssText . indexOf ( 'background' ) >= 0
11
8
// maybe with background-image: url(http://xxx) or base64 img
12
9
const listDelimiter = hasBackground ? / ; (? ! [ ^ ( ] * \) ) / g : ';'
13
10
const propertyDelimiter = hasBackground ? / : ( .+ ) / : ':'
14
11
cssText . split ( listDelimiter ) . forEach ( function ( item ) {
15
12
if ( item ) {
16
13
var tmp = item . split ( propertyDelimiter )
17
- tmp . length > 1 && ( rs [ tmp [ 0 ] . trim ( ) ] = tmp [ 1 ] . trim ( ) )
14
+ tmp . length > 1 && ( res [ tmp [ 0 ] . trim ( ) ] = tmp [ 1 ] . trim ( ) )
18
15
}
19
16
} )
20
- return rs
17
+ return res
21
18
} )
22
19
23
20
// merge static and dynamic style data on the same vnode
You can’t perform that action at this time.
0 commit comments