pawamoy/markdown-exec

bug: tree fences render an empty paragraph first

Closed this issue · 0 comments

Description of the bug

When rendering a tree with a tree fence, an empty paragraph is rendered before the code block.

To Reproduce

Just add a tree fence to a Markdown page:

```tree
./
    hello/
```

Full traceback

No traceback.

Expected behavior

No empty paragraph. It breaks some styling features of Material for MkDocs.

Environment information

python -m markdown_exec.debug  # | xclip -selection clipboard
  • System: Linux-6.9.3-arch1-1-x86_64-with-glibc2.39
  • Python: cpython 3.11.5 (/media/data/dev/griffe/.venv/bin/python)
  • Environment variables:
    • PYTHONPATH: /home/pawamoy/.local/pipx/venvs/pdm/lib/python3.11/site-packages/pdm/pep582
  • Installed packages:
    • markdown-exec v1.8.3

Additional context

/