Add README examples

Signed-off-by: jolheiser <john.olheiser@gmail.com>
main
jolheiser 2021-12-23 22:13:10 -06:00
parent 95922f3ce4
commit a47ce7b08d
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
1 changed files with 10 additions and 1 deletions

View File

@ -4,9 +4,18 @@ Embed "things" in your markdown files.
Given the same input, `emdbed` should give idempotent results.
To create an `emdbed` section, use a header and footer as follows
```text
<!-- emdbed: <file> [~<language>] [L<start-line>|/<start-regex>/] [L<end-line>|/<end-regex>/]
<!-- /emdbed -->
```
The regex is [Go flavored](https://golang.org/s/re2syntax), which you can test on [regex101](https://regex101.com/).
## Examples
The following are generated using [readme.go](readme.go) and `go generate ./...`.
Check the raw markdown for the header selectors used.
An entire file: