Adjust fenced_divs
syntax to resemble Markdown directive syntax
#7514
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #7480. Adds support for blocks of the form
Previously, you could specify only the attributes list XOR the name, but now you can do one, the other, or both. As discussed in the issue, this change was made to more closely resemble Markdown's de-facto standard for directive syntax. While this change does not fully support directive syntax, it makes documents which use directive syntax more compatible with pandoc.
Note that Markdown directives also allow
[inline content]
like below, but this is currently unsupported:For now, I see two options:
[inline content]
. I think this omission would be fine, since pandoc always creates divs from fenced sections, so it's not clear where the text should go anyway.[inline content]
but throw it away. This would ensure that pandoc is compatible with documents that use block directive syntax.If we go with Option 1, this PR is ready to merge. If we go with Option 2, I would just need to make a small change.
Full support for directive syntax will, I think, require an AST change, which would be a much larger project. I think this PR is a good compromise until then!