Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mdformat_myst/_directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def format_directive_content(raw_content: str) -> str:


def parse_opts_and_content(raw_content: str) -> tuple[str, str] | None:
if not raw_content:
return None
lines = raw_content.splitlines()
line = lines.pop(0)
yaml_lines = []
Expand Down
9 changes: 9 additions & 0 deletions tests/data/fixtures.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,3 +394,12 @@ letter: a
---
```
.

MyST directive, no opts or content
.
``` {some-directive} args
```
.
```{some-directive} args
```
.