Skip to content

Commit

Permalink
Merge pull request #1 from gedu/ts/style/styles-refactor
Browse files Browse the repository at this point in the history
Added a new condition to handle inner function with returning object …
  • Loading branch information
fabioh8010 authored Oct 3, 2023
2 parents 6005765 + c0239e2 commit 8ee979d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/scripts/findUnusedKeys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ find_theme_style_and_store_keys() {
fi

# Check if we are inside an arrow function
if [[ "$line" =~ ^[[:space:]]*([a-zA-Z0-9_-])+:[[:space:]]*\(.*\)[[:space:]]*'=>'[[:space:]]*\(\{ || "$line" =~ ^[[:space:]]*(const|let|var)[[:space:]]+([a-zA-Z0-9_-]+)[[:space:]]*=[[:space:]]*\(.*\)[[:space:]]*'=>' ]]; then
if [[ "$line" =~ ^[[:space:]]*([a-zA-Zgv 0-9_-])+:[[:space:]]*\(.*\)[[:space:]]*'=>'[[:space:]]*\(\{ || "$line" =~ ^[[:space:]]*([a-zA-Zgv 0-9_-])+:[[:space:]]*\(.*\)[[:space:]]*'=>' ]]; then
inside_arrow_function=true
continue
fi

if [[ "$line" =~ ^[[:space:]]*(const|let|var)[[:space:]]+([a-zA-Z0-9_-]+)[[:space:]]*=[[:space:]]*\(.*\)[[:space:]]*'=>' ]]; then
inside_arrow_function=true
continue
fi
Expand Down

0 comments on commit 8ee979d

Please sign in to comment.