Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
fix(parser): fix regex pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
r4zendev committed Dec 21, 2023
1 parent 220860a commit 9b5cf04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme-parser/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const findKeyLineRange = (yaml: string, key: string) => {
let startFound = false;

for (const [index, line] of splitYaml.entries()) {
if (startFound && line.match(/^\w+:\s/)) {
if (startFound && line.match(/^[A-Za-z0-9_-]+:\s/)) {
fieldEndLine = index;
break;
}

if (line.match(`^${key}:\\s`)) {
if (line.match(`^${key}:\s`)) {
fieldStartLine = index;
startFound = true;
}
Expand Down

0 comments on commit 9b5cf04

Please sign in to comment.