lookatme icon indicating copy to clipboard operation
lookatme copied to clipboard

Trying to change code block style breaks lookatme

Open handdara opened this issue 1 year ago • 0 comments

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: 0. 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)

  1. Make file minimal.md with contents show in spoiler at bottom
  2. Run lookatme minimal.md
  3. 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):

  • OS: Ubuntu 22.04
  • lookatme, version 3.0.0-rc5

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.*

handdara avatar Oct 22 '23 02:10 handdara