mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 21:17:47 +00:00
fix typo
This commit is contained in:
parent
04df530fdd
commit
db8a5feff6
@ -16,7 +16,7 @@ function hasHtml(data) {
|
|||||||
return /<[a-z][\s\S]*>/i.test(data);
|
return /<[a-z][\s\S]*>/i.test(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hasUnquotedHTags(data) {
|
function hasUnquotedTags(data) {
|
||||||
// Guard against unquoted HTML tags https://github.com/formatjs/formatjs/issues/1878
|
// Guard against unquoted HTML tags https://github.com/formatjs/formatjs/issues/1878
|
||||||
return /[^'](<.*>)[^']/i.test(data);
|
return /[^'](<.*>)[^']/i.test(data);
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ function recursiveCheckHasHtml(file, data, errors, recKey) {
|
|||||||
recursiveCheckHasHtml(file, data[key], errors, nextRecKey);
|
recursiveCheckHasHtml(file, data[key], errors, nextRecKey);
|
||||||
} else if (hasHtml(data[key])) {
|
} else if (hasHtml(data[key])) {
|
||||||
errors.push(`HTML found in ${file.path} at key ${recKey}.${key}`);
|
errors.push(`HTML found in ${file.path} at key ${recKey}.${key}`);
|
||||||
} else if (hasUnquotedHTags(data[key])) {
|
} else if (hasUnquotedTags(data[key])) {
|
||||||
errors.push(
|
errors.push(
|
||||||
`Unquoted tags found in ${file.path} at key ${recKey}.${key}`
|
`Unquoted tags found in ${file.path} at key ${recKey}.${key}`
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user