formatting

This commit is contained in:
meld-cp 2023-01-06 23:37:50 +13:00 committed by GitHub
parent c54f61439c
commit d55e5dd1ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,8 @@ Copy and paste the codeblock below into a new note to try it out.
````md
# A Simple Invoice Builder
This example will produce and open an `HTML` file representing a simple invoice. From your default web browser, it can then be saved as a PDF.
This example will produce and open an `HTML` file representing a simple invoice.
From your default web browser, it can then be saved as a PDF.
## Choose the invoice to build
```js meld-build
@ -107,10 +108,10 @@ const customer = customers.filter( e => e.id==inv.customer ).at(0);
// get the invoice template
const template = $.blocks.at(0);
// renter the template passing in the customer and invoice
// render the template passing in the customer and invoice
const html = await $.render( template, { customer, inv } );
// create an html invoice file and open it in the default browser, from there it can be saved as a PDF
await $.io.output( `inv ${inv.id}.html`, html, true );
```
````
````