From 53e41901558319e6063fdcbca4f6150101c57f10 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Mon, 11 Jan 2021 22:29:03 +0300 Subject: feat: allow passing variable context --- src/demo/content.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/demo/content.md (limited to 'src/demo') diff --git a/src/demo/content.md b/src/demo/content.md new file mode 100644 index 0000000..ad61d33 --- /dev/null +++ b/src/demo/content.md @@ -0,0 +1,17 @@ +## Markdown +[Markdown file](${url}) *(... +```react +fileName +``` +)* that you can see on the left was parsed and rendered by **BENZIN**! :rocket: +Switch between tabs on the header to explore other markdown templates. :recycle: +Templates on the left are being loaded from the [GitHub](https://github.com), though this pane is generated from plaintext. :pen: +## How do I use this feature? +``` +import Markdown from \'react-benzin\'; +const data = \'# Header\\nHello, *world!*\'; +ReactDOM.render(, document.getElementById(\'root\')); +``` +```react +tryButton +``` -- cgit v1.2.3 From e3253a726d4bb71825e392cbde89d05bb3146dc1 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Mon, 11 Jan 2021 22:40:43 +0300 Subject: feat: use inline syntax for context --- src/demo/content.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/demo') diff --git a/src/demo/content.md b/src/demo/content.md index ad61d33..41607a9 100644 --- a/src/demo/content.md +++ b/src/demo/content.md @@ -1,9 +1,5 @@ ## Markdown -[Markdown file](${url}) *(... -```react -fileName -``` -)* that you can see on the left was parsed and rendered by **BENZIN**! :rocket: +[Markdown file](${url}) *(...`$fileName`)* that you can see on the left was parsed and rendered by **BENZIN**! :rocket: Switch between tabs on the header to explore other markdown templates. :recycle: Templates on the left are being loaded from the [GitHub](https://github.com), though this pane is generated from plaintext. :pen: ## How do I use this feature? @@ -12,6 +8,6 @@ import Markdown from \'react-benzin\'; const data = \'# Header\\nHello, *world!*\'; ReactDOM.render(, document.getElementById(\'root\')); ``` -```react -tryButton -``` + +`$tryButton` + -- cgit v1.2.3 From fb6a805f7285a88e485fed52211f0d4631c1e860 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 14 Jan 2021 19:50:33 +0300 Subject: fix: remove unnecessary escape sequences --- src/demo/content.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/demo') diff --git a/src/demo/content.md b/src/demo/content.md index 41607a9..01d848f 100644 --- a/src/demo/content.md +++ b/src/demo/content.md @@ -4,9 +4,9 @@ Switch between tabs on the header to explore other markdown templates. :recycle: Templates on the left are being loaded from the [GitHub](https://github.com), though this pane is generated from plaintext. :pen: ## How do I use this feature? ``` -import Markdown from \'react-benzin\'; -const data = \'# Header\\nHello, *world!*\'; -ReactDOM.render(, document.getElementById(\'root\')); +import Markdown from 'react-benzin'; +const data = '# Header\nHello, *world!*'; +ReactDOM.render(, document.getElementById('root')); ``` `$tryButton` -- cgit v1.2.3