Skip to content

Commit 5b6da07

Browse files
committed
fix
1 parent 7387152 commit 5b6da07

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/svelte/tests/html_equal.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ export function setup_html_equal(options = {}) {
135135
try {
136136
assert.deepEqual(
137137
withoutNormalizeHtml
138-
? normalize_new_line(actual)
138+
? normalize_new_line(actual.trim())
139139
.replace(/(\sdata-svelte-h="[^"]+")/g, options.removeDataSvelte ? '' : '$1')
140140
.replace(/(<!(--)?.*?\2>)/g, preserveComments !== false ? '$1' : '')
141-
: normalize_html(window, actual, { ...options, preserveComments }),
141+
: normalize_html(window, actual.trim(), { ...options, preserveComments }),
142142
withoutNormalizeHtml
143-
? normalize_new_line(expected)
143+
? normalize_new_line(expected.trim())
144144
.replace(/(\sdata-svelte-h="[^"]+")/g, options.removeDataSvelte ? '' : '$1')
145145
.replace(/(<!(--)?.*?\2>)/g, preserveComments !== false ? '$1' : '')
146-
: normalize_html(window, expected, { ...options, preserveComments }),
146+
: normalize_html(window, expected.trim(), { ...options, preserveComments }),
147147
message
148148
);
149149
} catch (e) {

0 commit comments

Comments
 (0)