diff --git a/src/Parser.ts b/src/Parser.ts index 402d3f5..a58e332 100644 --- a/src/Parser.ts +++ b/src/Parser.ts @@ -5,7 +5,7 @@ import { Ingredient, Cookware, Step, Metadata, Item, ShoppingList } from './cook * @property defaultCookwareAmount The default value to pass if there is no cookware amount. By default the amount is 1 * @property defaultIngredientAmount The default value to pass if there is no ingredient amount. By default the amount is "some" * @property includeStepNumber Whether or not to include the step number in ingredient and cookware nodes - * + * */ export interface ParserOptions { defaultCookwareAmount?: string | number; @@ -29,7 +29,7 @@ export default class Parser { /** * Creates a new parser with the supplied options - * + * * @param options The parser's options */ constructor(options?: ParserOptions) { @@ -40,10 +40,10 @@ export default class Parser { /** * Parses a Cooklang string and returns any metadata, steps, or shopping lists - * + * * @param source A Cooklang recipe * @returns The extracted ingredients, cookwares, metadata, steps, and shopping lists - * + * * @see {@link https://cooklang.org/docs/spec/#the-cook-recipe-specification|Cooklang Recipe} */ parse(source: string): ParseResult { @@ -236,4 +236,4 @@ function parseShoppingListCategory(items: string): Array { } return list; -} \ No newline at end of file +} diff --git a/src/Recipe.ts b/src/Recipe.ts index 75d2f08..4ffc680 100644 --- a/src/Recipe.ts +++ b/src/Recipe.ts @@ -12,10 +12,10 @@ export default class Recipe { /** * Creates a new recipe from the supplied Cooklang string - * + * * @param source The Cooklang string to parse. If `source` is ommited, an empty recipe is created * @param options The options to pass to the parser - * + * * @see {@link https://cooklang.org/docs/spec/#the-cook-recipe-specification|Cooklang Recipe} */ constructor(source?: string, options?: ParserOptions) { @@ -27,7 +27,7 @@ export default class Recipe { /** * Generates a Cooklang string from the recipes metadata, steps, and shopping lists - * + * * @returns The generated Cooklang string */ toCooklang(): string { @@ -73,4 +73,4 @@ export default class Recipe { return [metadataStr, stepStrs.join('\n\n'), shoppingListStrs.join('\n\n')].join('\n'); } -} \ No newline at end of file +} diff --git a/src/example.ts b/src/example.ts index cbdc0b6..2dc63c2 100644 --- a/src/example.ts +++ b/src/example.ts @@ -5,7 +5,7 @@ const source = ` >> total time: 6 minutes >> servings: 2 -Place the @apple juice{1,5%cups}, @banana{one sliced}, @frozen mixed berries{1,5%cups} and @vanilla greek yogurt{3/4%cup} in a #blender{}; blend until smooth. If the smoothie seems too thick, add a little more liquid (1/4 cup). +Place the @apple juice{1,5%cups}, @banana{one sliced}, @frozen mixed berries{1,5%cups} and @vanilla greek yogurt{3/4%cup} in a #blender{}; blend until smooth. If the smoothie seems too thick, add a little more liquid (1/4 cup). Taste and add @honey{} if desired. Pour into two glasses and garnish with fresh berries and mint sprigs if desired. `; @@ -33,4 +33,4 @@ console.log(getImageURL('Mixed Berry Smoothie', { step: 1, extension: 'png' })); -// 'Mixed Berry Smoothie.1.png' \ No newline at end of file +// 'Mixed Berry Smoothie.1.png' diff --git a/src/index.ts b/src/index.ts index 27a124d..7f9c1b8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,17 +5,17 @@ export interface ImageURLOptions { /** * Creates a URL for an image of the the supplied recipe. - * + * * @example * ```typescript * getImageURL('Baked Potato', { extension: 'jpg', step: 2 }); * // returns "Baked Potato.2.jpg" * ``` - * + * * @param name Name of the .cook file. * @param options The URL options. * @returns The image URL for the givin recipe and step. - * + * * @see {@link https://cooklang.org/docs/spec/#adding-pictures|Cooklang Pictures Specification} */ export function getImageURL(name: string, options?: ImageURLOptions) { @@ -51,4 +51,4 @@ Slowly stir eggs onto pan, cook for about ~{10-15%sec}, then remove and add @ses Stir @miso paste{} into kombu broth, and bring to boil Pour the soup into the egg-stirring bowl, and top with chopped @scallions -`)); \ No newline at end of file +`)); diff --git a/tests/custom.yaml b/tests/custom.yaml index 81b6adf..40a18d1 100644 --- a/tests/custom.yaml +++ b/tests/custom.yaml @@ -177,4 +177,4 @@ tests: - type: text value: "step" metadata: - "source": "example.com" \ No newline at end of file + "source": "example.com" diff --git a/tools/docs.js b/tools/docs.js index c2dc704..c5319d6 100644 --- a/tools/docs.js +++ b/tools/docs.js @@ -38,4 +38,4 @@ function writer() { return this.output; }, } -} \ No newline at end of file +}