Repository: marp-team/marp-vscode
Pull request #514 (2025-05-28 09:20:03)

chore: fix typos
fix typos


Patch:
diff --git a/package.json b/package.json
index b9d6612..5b1cd7c 100644
--- a/package.json
+++ b/package.json
@@ -61,7 +61,7 @@
     "colors": [
       {
         "id": "marp.directiveKeyForeground",
-        "description": "Forground decoration color for the key of Marp directive",
+        "description": "Foreground decoration color for the key of Marp directive",
         "defaults": {
           "dark": "#67b8e3ff",
           "light": "#0288d1ff",
diff --git a/src/diagnostics/deprecated-color-setting-shorthand.ts b/src/diagnostics/deprecated-color-setting-shorthand.ts
index 24008e3..d2fadad 100644
--- a/src/diagnostics/deprecated-color-setting-shorthand.ts
+++ b/src/diagnostics/deprecated-color-setting-shorthand.ts
@@ -37,7 +37,7 @@ export function register(
       const diagnostic = Object.assign(
         new Diagnostic(
           range,
-          `Shorthand for setting colors via Markdown image syntax is deprecated, and will be removed in future. Please replace to the scoped local direcitve <!-- _${directive}: "${url}" -->, or consider to use the scoped style.`,
+          `Shorthand for setting colors via Markdown image syntax is deprecated, and will be removed in future. Please replace to the scoped local directive <!-- _${directive}: "${url}" -->, or consider to use the scoped style.`,
           DiagnosticSeverity.Warning,
         ),
         {
@@ -75,7 +75,7 @@ export class DeprecatedColorSettingShorthand implements CodeActionProvider {
     doc: TextDocument,
   ): CodeAction {
     const act = new CodeAction(
-      `Replace to the scoped local direcitve: ${diag[diagnosticMeta].replacement}`,
+      `Replace to the scoped local directive: ${diag[diagnosticMeta].replacement}`,
       CodeActionKind.QuickFix,
     )
 
diff --git a/src/marp-cli.ts b/src/marp-cli.ts
index a0724c0..7732dad 100644
--- a/src/marp-cli.ts
+++ b/src/marp-cli.ts
@@ -117,7 +117,7 @@ export default async function runMarpCli(
 
   if (exitCode !== 0) {
     throw new MarpCLIError(
-      `Marp CLI throwed unexpected error with exit code ${exitCode}.`,
+      `Marp CLI threw unexpected error with exit code ${exitCode}.`,
     )
   }
 }
diff --git a/src/utils.ts b/src/utils.ts
index 5b7bf8c..18671e9 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -35,7 +35,7 @@ export const fetch = (url: string, { timeout = 5000 }: FetchOption = {}) => {
   return _fetchPonyfillInstance
     .fetch(url, { signal: controller.signal })
     .then((res) => {
-      if (!res.ok) throw new Error(`Failured fetching ${url} (${res.status})`)
+      if (!res.ok) throw new Error(`Failed fetching ${url} (${res.status})`)
       return res.text()
     })
     .finally(() => {


Test patch:
diff --git a/src/utils.test.ts b/src/utils.test.ts
index 90469b1..c36ea01 100644
--- a/src/utils.test.ts
+++ b/src/utils.test.ts
@@ -44,7 +44,7 @@ describe('Utilities', () => {
 
       try {
         await expect(utils.fetch('https://example.com/')).rejects.toThrow(
-          'Failured fetching https://example.com/ (404)',
+          'Failed fetching https://example.com/ (404)',
         )
       } finally {
         fetchMock.mockRestore()