d0c-s4vage / lookatme

An interactive, terminal-based markdown presenter
https://lookatme.readthedocs.io/en/latest/
MIT License
2.06k stars 59 forks source link

Trying to change code block style breaks lookatme #223

Open handdara opened 9 months ago

handdara commented 9 months ago

Describe the bug Tried to change the color style of a code block. Broke the program at start (see screenshot). In the example I use the emacs format, but I tried with a bunch and the only one that worked was monokai.

To Reproduce

Steps to reproduce the behavior:

  1. Downgrade PyYAML to 5.3.1 (had to do this get it working, I'm also using 3.0 version of lookatme to because 2.5.5 wouldn't work either)
  2. Make file minimal.md with contents show in spoiler at bottom
  3. Run lookatme minimal.md
  4. Run lookatme minimal.md --log out.log to get log

Expected behavior Simply changes the color theme/style of a code block

Screenshots Output in terminal is same as in log, so I'll just paste log, the only change is I scrubbed the home directory name: image

Environment (please complete the following information):

Additional context

minimal.md

``` --- author: handdara title: Teaching C! styles: code: style: emacs --- # Minimal example --- # An example C function \```c int foo(int a) { return a + 50; } \``` ```

Note: the backslash in front of the backticks is because I couldn't figure out how to get the "codeblock within a codeblock" to escape the inner block. They're not there in the actual file.