From 265ac4501396a7d3418f06b0e9ea906899f0cfdc Mon Sep 17 00:00:00 2001 From: Arthur Caron Date: Mon, 15 Aug 2022 07:35:41 +0200 Subject: [PATCH] Code section added in the README.md (#414). (#427) --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index e16265a..a0739bb 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ docker run --rm -p 1948:1948 -p 35729:35729 -v :/slides web - [Docker][6] - [Features][7] - [Markdown][8] + - [Code Section][59] - [Theme][9] - [Highlight Theme][10] - [Custom Slide Separators][11] @@ -87,6 +88,32 @@ dashes surrounded by two blank lines (`\n---\n`). Example: Note: speaker notes FTW! ``` +#### Code section + +##### Syntax highlighting + +~~~mkdn +```js +console.log('Hello world!') +``` +~~~ + +##### Highlight some lines + +You can highlight one line, multiple lines or both. + +~~~mkdn +```python [1|3-6] +n = 0 +while n < 10: + if n % 2 == 0: + print(f"{n} is even") + else: + print(f"{n} is odd") + n += 1 +``` +~~~ + ### Theme Override theme (default: `black`): @@ -498,3 +525,4 @@ Many thanks to all [contributors][56]! [56]: https://github.com/webpro/reveal-md/graphs/contributors [57]: http://webpro.mit-license.org [58]: https://github.com/webpro/reveal-md/issues/102#issuecomment-692494366 +[59]: #code-section