@@ -76,7 +76,7 @@ export function element(node, index, parent, state) {
76
76
state . schema = svg
77
77
}
78
78
79
- const attrs = serializeAttributes ( state , node . properties )
79
+ const attributes = serializeAttributes ( state , node . properties )
80
80
81
81
const content = state . all (
82
82
schema . space === 'html' && node . tagName === 'template' ? node . content : node
@@ -92,14 +92,14 @@ export function element(node, index, parent, state) {
92
92
// longer void.
93
93
if ( content ) selfClosing = false
94
94
95
- if ( attrs || ! omit || ! opening ( node , index , parent ) ) {
96
- parts . push ( '<' , node . tagName , attrs ? ' ' + attrs : '' )
95
+ if ( attributes || ! omit || ! opening ( node , index , parent ) ) {
96
+ parts . push ( '<' , node . tagName , attributes ? ' ' + attributes : '' )
97
97
98
98
if (
99
99
selfClosing &&
100
100
( schema . space === 'svg' || state . settings . closeSelfClosing )
101
101
) {
102
- last = attrs . charAt ( attrs . length - 1 )
102
+ last = attributes . charAt ( attributes . length - 1 )
103
103
if (
104
104
! state . settings . tightSelfClosing ||
105
105
last === '/' ||
@@ -125,20 +125,20 @@ export function element(node, index, parent, state) {
125
125
126
126
/**
127
127
* @param {State } state
128
- * @param {Properties | null | undefined } props
128
+ * @param {Properties | null | undefined } properties
129
129
* @returns {string }
130
130
*/
131
- function serializeAttributes ( state , props ) {
131
+ function serializeAttributes ( state , properties ) {
132
132
/** @type {Array<string> } */
133
133
const values = [ ]
134
134
let index = - 1
135
135
/** @type {string } */
136
136
let key
137
137
138
- if ( props ) {
139
- for ( key in props ) {
140
- if ( props [ key ] !== null && props [ key ] !== undefined ) {
141
- const value = serializeAttribute ( state , key , props [ key ] )
138
+ if ( properties ) {
139
+ for ( key in properties ) {
140
+ if ( properties [ key ] !== null && properties [ key ] !== undefined ) {
141
+ const value = serializeAttribute ( state , key , properties [ key ] )
142
142
if ( value ) values . push ( value )
143
143
}
144
144
}
0 commit comments