Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty code blocks are erroring #57

Closed
d0c-s4vage opened this issue Dec 5, 2019 · 0 comments · Fixed by #60
Closed

Empty code blocks are erroring #57

d0c-s4vage opened this issue Dec 5, 2019 · 0 comments · Fixed by #60
Labels
bug Something isn't working

Comments

@d0c-s4vage
Copy link
Owner

lookatme test.md
Traceback (most recent call last):
  File "/home/james/__ws__/dev/lookatme/venv3/bin/lookatme", line 11, in <module>
    load_entry_point('lookatme', 'console_scripts', 'lookatme')()
  File "/home/james/__ws__/dev/lookatme/venv3/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/james/__ws__/dev/lookatme/venv3/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/james/__ws__/dev/lookatme/venv3/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/james/__ws__/dev/lookatme/venv3/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/james/__ws__/dev/lookatme/lookatme/__main__.py", line 74, in main
    pres.run()
  File "/home/james/__ws__/dev/lookatme/lookatme/pres.py", line 89, in run
    self.tui = lookatme.tui.create_tui(self, start_slide=start_slide)
  File "/home/james/__ws__/dev/lookatme/lookatme/tui.py", line 273, in create_tui
    tui = MarkdownTui(pres, palette, start_slide)
  File "/home/james/__ws__/dev/lookatme/lookatme/tui.py", line 162, in __init__
    self.prep_pres(self.pres, start_idx)
  File "/home/james/__ws__/dev/lookatme/lookatme/tui.py", line 175, in prep_pres
    self.update()
  File "/home/james/__ws__/dev/lookatme/lookatme/tui.py", line 216, in update
    self.update_body()
  File "/home/james/__ws__/dev/lookatme/lookatme/tui.py", line 207, in update_body
    rendered = self.slide_renderer.render_slide(self.curr_slide)
  File "/home/james/__ws__/dev/lookatme/lookatme/tui.py", line 70, in render_slide
    raise res
  File "/home/james/__ws__/dev/lookatme/lookatme/tui.py", line 100, in run
    res = self._do_render(to_render, slide_num)
  File "/home/james/__ws__/dev/lookatme/lookatme/tui.py", line 123, in _do_render
    res = render_token(token, stack[-1], stack, self.loop)
  File "/home/james/__ws__/dev/lookatme/lookatme/contrib/__init__.py", line 66, in inner
    return fn(*args, **kwargs)
  File "/home/james/__ws__/dev/lookatme/lookatme/render/markdown_block.py", line 209, in render_code
    res = pygments_render.render_text(token["text"], lang=lang)
  File "/home/james/__ws__/dev/lookatme/lookatme/render/pygments.py", line 76, in render_text
    if markup[-1][1].endswith("\n"):
IndexError: list index out of range
@d0c-s4vage d0c-s4vage added the bug Something isn't working label Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant