Skip to content

Instantly share code, notes, and snippets.

@aziis98
Last active July 23, 2020 15:25
Show Gist options
  • Select an option

  • Save aziis98/642dc8fb3ae9f00137a8d8972d1a1be6 to your computer and use it in GitHub Desktop.

Select an option

Save aziis98/642dc8fb3ae9f00137a8d8972d1a1be6 to your computer and use it in GitHub Desktop.
BTL - A backtick extensible templating language (prototype specification)

BTL - Backtick Templating Language

A backtick centered extensible templating language inspired by Javascript template litterals.

Examples

h1`A title`

This is a paragraph.

This is b`another` paragraph.

You can also inject expressions, for example now we are in $year.

If you really need variables they can be used ${x = 12} like so $x.

Also links link[`www.github.com`]`this is a link to github.com`.

This can be extened with text preprocessors and postprocessors that manipulate the text.

use`markdown`

# Better syntax

Also for **bold** and _italic_.

1. TODO

  • Make things recursive a scoped
  • The output is a structured list of strings and "compound blocks"
  • Choose between foobar(`A parameter`, b = `Another parameter`)`Some text` and foobar[`A parameter`, b = `Another parameter`]`Some text`
  • Add "raw" blocks for edge cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment