Skip to content

👌 Stop directive-option parsing at colon fences#1133

Merged
chrisjsewell merged 1 commit into
masterfrom
nested-colon-fence
May 13, 2026
Merged

👌 Stop directive-option parsing at colon fences#1133
chrisjsewell merged 1 commit into
masterfrom
nested-colon-fence

Conversation

@chrisjsewell
Copy link
Copy Markdown
Member

@chrisjsewell chrisjsewell commented May 13, 2026

In order to determine a directive option block,
we look for all lines at the top of the directive that begin with :. However, this failed for a nested colon fence like:

::::{note}
:class: abc
:::{note}
content
:::
::::

This adds a check to terminate the option block
when a line starts with 3 or more colons.

closes #963

In order to determine a directive option block,
we look for all lines at the top of the directive that begin with `:`.
However, this failed for a nested colon fence like:

```
::::{note}
:class: abc
:::{note}
content
:::
::::
```

This adds a check to terminate the option block
when a line starts with 3 or more colons.
@chrisjsewell chrisjsewell merged commit 4ce57f9 into master May 13, 2026
22 checks passed
@chrisjsewell chrisjsewell deleted the nested-colon-fence branch May 13, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nested directives combined with colon fences do not parse YAML blocks correctly

1 participant