From 760b93731444397c963be68c9ff9d547f964f320 Mon Sep 17 00:00:00 2001 From: Franklin Shera Date: Thu, 30 Apr 2026 05:50:24 +0300 Subject: [PATCH 1/2] fix: correct typos in documents.server.ts comments and error messages --- src/utils/documents.server.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/documents.server.ts b/src/utils/documents.server.ts index 0dff458d7..dd77cdcd4 100644 --- a/src/utils/documents.server.ts +++ b/src/utils/documents.server.ts @@ -187,7 +187,7 @@ function replaceSections( frontmatter: graymatter.GrayMatterFile, ) { let result = text - // RegExp defining token pair to dicover sections in the document + // RegExp defining token pair to discover sections in the document // [//]: # (
) const sectionMarkerRegex = /\[\/\/\]: # '([a-zA-Z\d]*)'/g const sectionRegex = @@ -198,7 +198,7 @@ function replaceSections( for (const match of frontmatter.content.matchAll(sectionRegex)) { if (match[1] !== match[2]) { console.error( - `Origin section '${match[1]}' does not have matching closing token (found '${match[2]}'). Please make sure that each section has corresponsing closing token and that sections are not nested.`, + `Origin section '${match[1]}' does not have matching closing token (found '${match[2]}'). Please make sure that each section has corresponding closing token and that sections are not nested.`, ) } @@ -210,7 +210,7 @@ function replaceSections( for (const match of result.matchAll(sectionRegex)) { if (match[1] !== match[2]) { console.error( - `Target section '${match[1]}' does not have matching closing token (found '${match[2]}'). Please make sure that each section has corresponsing closing token and that sections are not nested.`, + `Target section '${match[1]}' does not have matching closing token (found '${match[2]}'). Please make sure that each section has corresponding closing token and that sections are not nested.`, ) } From 62e9953a3054c077a88aa90206081856fadc6c00 Mon Sep 17 00:00:00 2001 From: Franklin Shera Date: Fri, 1 May 2026 04:18:35 +0300 Subject: [PATCH 2/2] fix: correct typo in documents.server.ts comment --- src/utils/documents.server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/documents.server.ts b/src/utils/documents.server.ts index dd77cdcd4..4cf697865 100644 --- a/src/utils/documents.server.ts +++ b/src/utils/documents.server.ts @@ -177,7 +177,7 @@ function replaceContent( * Perform tokenized sections replace in text. * - Discover sections based on token marker via RegExp in origin file. * - Discover sections based on token marker via RegExp in target file. - * - replace sections in target file staring from the end, with sections defined in origin file + * - replace sections in target file starting from the end, with sections defined in origin file * @param text File content * @param frontmatter Referencing file front-matter * @returns File content with replaced sections