Skip to content

Commit

Permalink
Merge pull request #26 from kurokoji/main
Browse files Browse the repository at this point in the history
Fix counting of nested marker
  • Loading branch information
Shougo authored Jul 18, 2024
2 parents 62ec1a0 + ac2275d commit 188fb16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion denops/dpp/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ export function parseHooksFile(
continue;
}

nestedCount++;

hookName = match.groups.hookName;
if (
hookName.startsWith("hook_") ||
Expand All @@ -147,7 +149,7 @@ export function parseHooksFile(
// End marker
nestedCount--;

if (nestedCount < 0) {
if (nestedCount <= 0) {
// Nested end
hookName = "";
continue;
Expand Down

0 comments on commit 188fb16

Please sign in to comment.