Skip to content

Commit

Permalink
moved code to the main else if clause.
Browse files Browse the repository at this point in the history
  • Loading branch information
jellizaveta committed Oct 24, 2023
1 parent 1c8dc14 commit a423faa
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/main/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,14 @@ module.exports = (function () {

for (let i = 1; i < parts.length; i += 1) {
const attribute = parts[i].trim();
// Check if the 'attribute' string starts with 'INCLUDE_OPTION_MODIFIERS'.
if (attribute.startsWith(INCLUDE_OPTION_MODIFIERS)) {
if (attribute.startsWith(INCLUDE_OPTION_COMMENTS)) {
stripComments = true;
} else if (attribute.startsWith(INCLUDE_OPTION_NOT_OPTIMIZED)) {
notOptimized = true;
} else if (attribute.startsWith(INCLUDE_OPTION_EXCLUDE)) {
exclude = attribute.substring(attribute.indexOf('=') + 1);
exclude = stripEndQuotes(exclude);
} else if (attribute.startsWith(INCLUDE_OPTION_MODIFIERS)) {
// Find the index of the first occurrence of '="' and add 2 to get the start index of the value.
const startIndex = attribute.indexOf('="') + 2;
// Find the index of the last occurrence of '"' to get the end index of the value.
Expand All @@ -289,14 +295,6 @@ module.exports = (function () {
addModifiers = null;
}
}
if (attribute.startsWith(INCLUDE_OPTION_COMMENTS)) {
stripComments = true;
} else if (attribute.startsWith(INCLUDE_OPTION_NOT_OPTIMIZED)) {
notOptimized = true;
} else if (attribute.startsWith(INCLUDE_OPTION_EXCLUDE)) {
exclude = attribute.substring(attribute.indexOf('=') + 1);
exclude = stripEndQuotes(exclude);
}
}

return {
Expand Down

0 comments on commit a423faa

Please sign in to comment.