https://github.com/arve0/markdown-it-template-literals
`${template} literals for markdown-it`
https://github.com/arve0/markdown-it-template-literals
Last synced: 3 months ago
JSON representation
`${template} literals for markdown-it`
- Host: GitHub
- URL: https://github.com/arve0/markdown-it-template-literals
- Owner: arve0
- Created: 2018-09-01T17:13:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-01T17:22:21.000Z (over 6 years ago)
- Last Synced: 2024-04-25T16:21:09.749Z (about 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# markdown-it-template-literals
markdown-it-template-literals lets you put ${variables} in your markdown, similar as
[JS template strings](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals).For example, take this input:
```md
// define variables here under __md_tl_scope, use var (do not use let or const)
var __md_tl_scope = {
variables: [1,2,3].map(_ => Math.random()),
replaced: 'rrrrreplaced',
}# This is
some markdown with \${variables} that
can be \${replaced}.```
Results in:
```html
var __md_tl_scope = {
variables: [1,2,3].map(_ => Math.random()),
replaced: 'rrrrreplaced',
}This is
some markdown with 0.5828191413301298,0.043310291215606256,0.9787475428111776 that
can be rrrrreplaced.
```## Security
This package uses evil eval, be aware of injection attacks!## License
MIT © Arve Seljebu