From acf9d62dfb4a487dfa687aa5ed3153ea1084e54c Mon Sep 17 00:00:00 2001 From: Chan Yu Cheng Date: Sun, 5 Mar 2023 16:48:52 +0800 Subject: [PATCH 01/10] Use codeAndOutputCode boilerplate for ug index --- docs/index.md | 47 ++++++++--------------------------------------- 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/docs/index.md b/docs/index.md index cb528866ad..f8f984cd90 100644 --- a/docs/index.md +++ b/docs/index.md @@ -33,33 +33,15 @@ MarkBind extensions to Markdown | `==highlighted text==`
`%%grey text%%`
` An example that uses GFMD syntax for task lists:
- - -  -  -  - -
- -```markdown -**Things to do:** - -- [x] Finish my changes -- [ ] Push my commits to GitHub -- [ ] Open a pull request - -``` -   →  - - + + **Things to do:** - [x] Finish my changes - [ ] Push my commits to GitHub - [ ] Open a pull request - -
+ +
@@ -67,24 +49,11 @@ An example that uses KaTeX to generate math equations:
- - -  -  -  - -
- -```markdown -Euler's Identity \(e^{i\pi}+1=0\) is a beautiful formula. -``` -   →  - - + + Euler's Identity \(e^{i\pi}+1=0\) is a beautiful formula. - -
+ +
From 09a5a58319d0f9c94b6da56fc2a6580adf7b1fc7 Mon Sep 17 00:00:00 2001 From: Chan Yu Cheng Date: Mon, 6 Mar 2023 17:43:59 +0800 Subject: [PATCH 02/10] Change boilerplate to allow for horizontal layouts --- docs/_markbind/boilerplates/codeAndOutput.md | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/_markbind/boilerplates/codeAndOutput.md b/docs/_markbind/boilerplates/codeAndOutput.md index c0e165e0ac..0858a9c033 100644 --- a/docs/_markbind/boilerplates/codeAndOutput.md +++ b/docs/_markbind/boilerplates/codeAndOutput.md @@ -5,6 +5,7 @@ +{% macro codeBox() %} %%CODE:%%
@@ -12,12 +13,42 @@ {{ code | safe | trim }} ```
+{% endmacro %} +{% macro outputBox() %} %%OUTPUT:%%
{{ code | safe }} +
+{% endmacro %} + +{% if horizontal != null %} +
+ + + + + + + + +
+{{ codeBox() }} + +{{ outputBox() }} +
+
+ +{% else %} + +{{ codeBox() }} + +{{ outputBox() }} + + +{% endif %} From e8e5fe99136e55fbe71c4b256b5f418eef3988da Mon Sep 17 00:00:00 2001 From: Chan Yu Cheng Date: Mon, 6 Mar 2023 21:38:21 +0800 Subject: [PATCH 03/10] Change boilerplate of codeAndOutputCode to allow horizontal output --- .../boilerplates/codeAndOutputCode.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/_markbind/boilerplates/codeAndOutputCode.md b/docs/_markbind/boilerplates/codeAndOutputCode.md index 46b2140af2..15c8a2dbdf 100644 --- a/docs/_markbind/boilerplates/codeAndOutputCode.md +++ b/docs/_markbind/boilerplates/codeAndOutputCode.md @@ -5,6 +5,7 @@ +{% macro codeBox() %} %%CODE:%%
@@ -12,7 +13,9 @@ {{ code | safe | trim }} ````
+{% endmacro %} +{% macro outputBox() %} %%OUTPUT:%%
@@ -21,3 +24,30 @@ {{ code | safe }}
+{% endmacro %} + +{% if horizontal != null %} +
+ + + + + + + + +
+{{ codeBox() }} + +{{ outputBox() }} +
+
+ +{% else %} + +{{ codeBox() }} + +{{ outputBox() }} + + +{% endif %} From 95c6bfc99faf7d1e4dbb67170c8dd6cbc2fd4812 Mon Sep 17 00:00:00 2001 From: Chan Yu Cheng Date: Mon, 6 Mar 2023 21:49:08 +0800 Subject: [PATCH 04/10] Change first example of code to horizontal layout --- docs/index.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/index.md b/docs/index.md index f8f984cd90..75f8f5d4ba 100644 --- a/docs/index.md +++ b/docs/index.md @@ -31,30 +31,27 @@ MarkBind extensions to Markdown | `==highlighted text==`
`%%grey text%%`
` An example that uses GFMD syntax for task lists: -
- + +markdown + **Things to do:** - - [x] Finish my changes - [ ] Push my commits to GitHub - [ ] Open a pull request -
An example that uses KaTeX to generate math equations: -
- - + +markdown Euler's Identity \(e^{i\pi}+1=0\) is a beautiful formula. -

From ee8c1e8e14aadf7d7a2f70d19cb3c9d68e4b371f Mon Sep 17 00:00:00 2001 From: Chan Yu Cheng Date: Mon, 6 Mar 2023 22:06:05 +0800 Subject: [PATCH 05/10] Remove unecessary indented class --- docs/_markbind/boilerplates/codeAndOutput.md | 2 +- docs/_markbind/boilerplates/codeAndOutputCode.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_markbind/boilerplates/codeAndOutput.md b/docs/_markbind/boilerplates/codeAndOutput.md index 0858a9c033..38078bdc5b 100644 --- a/docs/_markbind/boilerplates/codeAndOutput.md +++ b/docs/_markbind/boilerplates/codeAndOutput.md @@ -28,7 +28,7 @@ {% endmacro %} {% if horizontal != null %} -

+
diff --git a/docs/_markbind/boilerplates/codeAndOutputCode.md b/docs/_markbind/boilerplates/codeAndOutputCode.md index 15c8a2dbdf..08932ad8c2 100644 --- a/docs/_markbind/boilerplates/codeAndOutputCode.md +++ b/docs/_markbind/boilerplates/codeAndOutputCode.md @@ -27,7 +27,7 @@ {% endmacro %} {% if horizontal != null %} -
+
From 1f7081ba001d33bc13545a73544d7584340e3e0d Mon Sep 17 00:00:00 2001 From: Chan Yu Cheng Date: Mon, 6 Mar 2023 22:06:44 +0800 Subject: [PATCH 06/10] Update documentation for variables --- docs/_markbind/boilerplates/codeAndOutput.md | 3 ++- docs/_markbind/boilerplates/codeAndOutputCode.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/_markbind/boilerplates/codeAndOutput.md b/docs/_markbind/boilerplates/codeAndOutput.md index 38078bdc5b..2c3831010c 100644 --- a/docs/_markbind/boilerplates/codeAndOutput.md +++ b/docs/_markbind/boilerplates/codeAndOutput.md @@ -1,9 +1,10 @@ - + + {% macro codeBox() %} %%CODE:%% diff --git a/docs/_markbind/boilerplates/codeAndOutputCode.md b/docs/_markbind/boilerplates/codeAndOutputCode.md index 08932ad8c2..20bc455de3 100644 --- a/docs/_markbind/boilerplates/codeAndOutputCode.md +++ b/docs/_markbind/boilerplates/codeAndOutputCode.md @@ -1,9 +1,10 @@ - + + {% macro codeBox() %} %%CODE:%% From ca212e77c377e0f0ced60f345cdc9ae5e3487d17 Mon Sep 17 00:00:00 2001 From: Chan Yu Cheng Date: Mon, 6 Mar 2023 22:09:15 +0800 Subject: [PATCH 07/10] Add horizontal layout for codeAndOutputSeperate boilerplate --- .../boilerplates/codeAndOutputSeparate.md | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/_markbind/boilerplates/codeAndOutputSeparate.md b/docs/_markbind/boilerplates/codeAndOutputSeparate.md index 3e31b0686b..09dcca8652 100644 --- a/docs/_markbind/boilerplates/codeAndOutputSeparate.md +++ b/docs/_markbind/boilerplates/codeAndOutputSeparate.md @@ -1,10 +1,12 @@ - + + +{% macro codeBox() %} %%CODE:%%
@@ -12,7 +14,9 @@ {{ code | safe | trim }} ```
+{% endmacro %} +{% macro outputBox() %} %%OUTPUT:%%
@@ -21,3 +25,30 @@ {{ output | safe }}
+{% endmacro %} + +{% if horizontal != null %} +
+
+ + + + + + + +
+{{ codeBox() }} + +{{ outputBox() }} +
+
+ +{% else %} + +{{ codeBox() }} + +{{ outputBox() }} +
+ +{% endif %} From d91f47a4507faa2c3f30d26a2c12d25cb6a83928 Mon Sep 17 00:00:00 2001 From: Chan Yu Cheng Date: Mon, 6 Mar 2023 22:16:49 +0800 Subject: [PATCH 08/10] Remove uncessary linebreak --- docs/_markbind/boilerplates/codeAndOutput.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/_markbind/boilerplates/codeAndOutput.md b/docs/_markbind/boilerplates/codeAndOutput.md index 2c3831010c..763daef714 100644 --- a/docs/_markbind/boilerplates/codeAndOutput.md +++ b/docs/_markbind/boilerplates/codeAndOutput.md @@ -23,7 +23,6 @@ {{ code | safe }} - {% endmacro %} From 3357ebe04eba93688d46077306f98eea891e7be9 Mon Sep 17 00:00:00 2001 From: Chan Yu Cheng Date: Tue, 7 Mar 2023 07:41:19 +0800 Subject: [PATCH 09/10] Fix typo in codeAndOutputCode --- docs/_markbind/boilerplates/codeAndOutputCode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_markbind/boilerplates/codeAndOutputCode.md b/docs/_markbind/boilerplates/codeAndOutputCode.md index 20bc455de3..8221a91c45 100644 --- a/docs/_markbind/boilerplates/codeAndOutputCode.md +++ b/docs/_markbind/boilerplates/codeAndOutputCode.md @@ -1,4 +1,4 @@ - + From d0c46e570825f1f3ea7801cb5af30160a0aacd3a Mon Sep 17 00:00:00 2001 From: Chan Yu Cheng Date: Tue, 7 Mar 2023 09:07:58 +0800 Subject: [PATCH 10/10] Remove nits in code --- docs/_markbind/boilerplates/codeAndOutput.md | 2 -- docs/_markbind/boilerplates/codeAndOutputCode.md | 2 -- docs/_markbind/boilerplates/codeAndOutputSeparate.md | 2 -- 3 files changed, 6 deletions(-) diff --git a/docs/_markbind/boilerplates/codeAndOutput.md b/docs/_markbind/boilerplates/codeAndOutput.md index 763daef714..6aa38cbc93 100644 --- a/docs/_markbind/boilerplates/codeAndOutput.md +++ b/docs/_markbind/boilerplates/codeAndOutput.md @@ -35,7 +35,6 @@ {{ codeBox() }} - {{ outputBox() }} @@ -49,6 +48,5 @@ {{ codeBox() }} {{ outputBox() }} - {% endif %} diff --git a/docs/_markbind/boilerplates/codeAndOutputCode.md b/docs/_markbind/boilerplates/codeAndOutputCode.md index 8221a91c45..d8457b298e 100644 --- a/docs/_markbind/boilerplates/codeAndOutputCode.md +++ b/docs/_markbind/boilerplates/codeAndOutputCode.md @@ -35,7 +35,6 @@ {{ codeBox() }} - {{ outputBox() }} @@ -49,6 +48,5 @@ {{ codeBox() }} {{ outputBox() }} - {% endif %} diff --git a/docs/_markbind/boilerplates/codeAndOutputSeparate.md b/docs/_markbind/boilerplates/codeAndOutputSeparate.md index 09dcca8652..71bf2a742e 100644 --- a/docs/_markbind/boilerplates/codeAndOutputSeparate.md +++ b/docs/_markbind/boilerplates/codeAndOutputSeparate.md @@ -35,7 +35,6 @@ {{ codeBox() }} - {{ outputBox() }} @@ -49,6 +48,5 @@ {{ codeBox() }} {{ outputBox() }} - {% endif %}