Skip to content

Commit

Permalink
Added ignore tags like input. Fixed typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Seyfarth committed Sep 27, 2023
1 parent 80bbfff commit ef290b6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,14 @@ function getTranslationsFromAPI(strings, language, apiKey) {
function extractTextNodes(node, textNodes) {
if (!node) return;
if (node.tagName == "SCRIPT") return;
if (node.tagName == "svg") return;
if (node.tagName == "path") return;
if (node.tagName == "circle") return;
if (node.tagName == "SVG") return;
if (node.tagName == "PATH") return;
if (node.tagName == "CIRCLE") return;
if (node.tagName == "TEXTAREA") return;
if (node.tagName == "INPUT") return;
if (node.tagName == "STYLE") return;
if (node.tagName == "SVG") return;

if (node.nodeType === Node.TEXT_NODE) {
textNodes.push(node);
} else {
Expand Down

0 comments on commit ef290b6

Please sign in to comment.