From a2261e90840bdcb0ce5509abceaddc1974795cba Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Sun, 11 Feb 2024 22:36:23 +0100 Subject: [PATCH] Fix typos (#241) --- docs/COMPILE.md | 12 ++++++------ src/api/LongformAPI.ts | 2 +- src/compile/steps/remove-links.ts | 2 +- src/compile/steps/write-to-note.ts | 4 ++-- src/view/compile/add-step-modal/index.ts | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/COMPILE.md b/docs/COMPILE.md index 4ac8ab1..d3648bf 100644 --- a/docs/COMPILE.md +++ b/docs/COMPILE.md @@ -28,10 +28,10 @@ _Scene_ Prepends each scene's title (its note name) before its content. Options: -| Name | Type | Default | Description | -| ------------ | ---- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Title Format | Text | $1 | A format string that lets you customize how the title is inserted. A `$1` in the string will be replaced with the scene title. A `$2`, if present, will be replaced with the scene’s number (first scene is “1,“ it’s child is “1.1,” etc.). Wrapping text in $3{} will repeat that text a number of times equal to the scene’s indentation level plus one—e.g., $3{#} for unindented scenes becomes “#”. | -| Separator | Text | \n\n | Some text to insert between the formatted title and the rest of the scene. | +| Name | Type | Default | Description | +| ------------ | ---- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Title Format | Text | $1 | A format string that lets you customize how the title is inserted. A `$1` in the string will be replaced with the scene title. A `$2`, if present, will be replaced with the scene’s number (first scene is “1,“ it’s child is “1.1,” etc.). Wrapping text in $3{} will repeat that text a number of times equal to the scene’s indentation level plus one—e.g., $3{#} for unindented scenes becomes “#”. | +| Separator | Text | \n\n | Some text to insert between the formatted title and the rest of the scene. | #### Remove Comments @@ -183,7 +183,7 @@ Once loaded, the user script will be available in the Add Step menu of Compile. ## Workflows -In Compile, steps are organized into workflows. Longform ships with a defaut workflow that demonstrates Compile and produces a simple formatted manuscript. Feel free to customize or delete the default workflow. +In Compile, steps are organized into workflows. Longform ships with a default workflow that demonstrates Compile and produces a simple formatted manuscript. Feel free to customize or delete the default workflow. You can create new workflows to suit each of your projects. Each workflow has a description box you may use to remind yourself what exactly the workflow does. A Longform project remembers its last-used workflow and will select it first when you next open the Compile tab. @@ -193,4 +193,4 @@ You can drag steps within a workflow to rearrange them. ## The Future -Compile remains a feature that will change over time. [Open issues](https://github.com/kevboh/longform/issues?q=is%3Aissue+is%3Aopen+label%3Acompile) are a good way to track what's on the roadmap. I plan on adding more steps and a few more features that allow you to fully customize what happens inside a given workflow. As always, if you think a step should be added or changed, or that compile should behave differently, pleaes open an issue in GitHub. +Compile remains a feature that will change over time. [Open issues](https://github.com/kevboh/longform/issues?q=is%3Aissue+is%3Aopen+label%3Acompile) are a good way to track what's on the roadmap. I plan on adding more steps and a few more features that allow you to fully customize what happens inside a given workflow. As always, if you think a step should be added or changed, or that compile should behave differently, please open an issue in GitHub. diff --git a/src/api/LongformAPI.ts b/src/api/LongformAPI.ts index ed08f67..fd17814 100644 --- a/src/api/LongformAPI.ts +++ b/src/api/LongformAPI.ts @@ -47,7 +47,7 @@ export class LongformAPI { /** * Converts a YAML-compatible potentially-nested array of strings into a single-dimension array of `{title: string; indent: number}` objects. * - * Longform uses the YAML format to store scenes with indentation information; this function is useful if you want to read that YAML yourself and convert it into data you can reason about. For examle, the YAML: + * Longform uses the YAML format to store scenes with indentation information; this function is useful if you want to read that YAML yourself and convert it into data you can reason about. For example, the YAML: * * ```yaml * - My First Scene diff --git a/src/compile/steps/remove-links.ts b/src/compile/steps/remove-links.ts index c2b716c..320beca 100644 --- a/src/compile/steps/remove-links.ts +++ b/src/compile/steps/remove-links.ts @@ -89,7 +89,7 @@ export function replaceWikiLinks(contents: string): string { if (startOfAlias >= 0) { additionalAlias = true; } - startOfAlias = i + 1; // update to ealiest instance of the character + startOfAlias = i + 1; // update to earliest instance of the character continue; } if (char === "[") { diff --git a/src/compile/steps/write-to-note.ts b/src/compile/steps/write-to-note.ts index ec64d99..6c61e7c 100644 --- a/src/compile/steps/write-to-note.ts +++ b/src/compile/steps/write-to-note.ts @@ -77,8 +77,8 @@ async function ensureContainingFolderExists( app: App, filePath: string ): Promise { - const conatiningFolderParts = filePath.split("/"); - const containingFolderPath = conatiningFolderParts.slice(0, -1).join("/"); + const containingFolderParts = filePath.split("/"); + const containingFolderPath = containingFolderParts.slice(0, -1).join("/"); try { await app.vault.createFolder(containingFolderPath); diff --git a/src/view/compile/add-step-modal/index.ts b/src/view/compile/add-step-modal/index.ts index 9bfcb05..7cfb21d 100644 --- a/src/view/compile/add-step-modal/index.ts +++ b/src/view/compile/add-step-modal/index.ts @@ -11,7 +11,7 @@ export default class AddStepModalContainer extends Modal { onOpen(): void { const { contentEl } = this; - contentEl.createEl("h1", { text: "Add Compile Step to Workfow" }); + contentEl.createEl("h1", { text: "Add Compile Step to Workflow" }); const entrypoint = contentEl.createDiv("longform-add-step-root"); const context = appContext(this);