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

Commit

Permalink
fix(parser): comments
Browse files Browse the repository at this point in the history
  • Loading branch information
r4zendev committed Dec 21, 2023
1 parent f2a9b22 commit 6c15d0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion readme-parser/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,12 @@ export const sync = async () => {
continue;
}

// Also update the updated-on field
changedKeys.push('updated-on');
// Yaml to be updated on each iteration serving as a target to make replacements in
let updatedYaml = websiteYamlContent;
const newFileLines = newReadmeYamlContent.split('\n');

for (const key of changedKeys) {
const websiteRange = findKeyLineRange(updatedYaml, key);
if (!websiteRange) {
Expand All @@ -176,8 +180,8 @@ export const sync = async () => {
const [websiteStartIndex, websiteEndIndex] = websiteRange;
const [newFileStartIndex, newFileEndIndex] = newFileRange;

// Use the latest version of yaml that's being updated
const websiteLines = updatedYaml.split('\n');
const newFileLines = newReadmeYamlContent.split('\n');

updatedYaml = [
'---',
Expand Down

0 comments on commit 6c15d0e

Please sign in to comment.