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

Allow references and notes in fenced divs #69

Merged
merged 3 commits into from Sep 27, 2023
Merged

Conversation

Witiko
Copy link
Collaborator

@Witiko Witiko commented May 18, 2023

Our implementation of fenced divs does not allow for reference definitions. This is because our implementation uses the parsers.blankline pattern instead of the Blank rule, which includes blank lines and references, among other things.

This pull request is a port of Witiko#307.

@Witiko Witiko added the bug label May 18, 2023
@Witiko Witiko force-pushed the fix/fenced-div-references branch from 8cb7859 to 24affa8 Compare May 18, 2023 14:34
@Witiko Witiko force-pushed the fix/fenced-div-references branch from 79200d7 to 49c2118 Compare May 18, 2023 14:36
@Witiko
Copy link
Collaborator Author

Witiko commented May 18, 2023

@Omikhleia a review would be appreciated. I suppose you may want this in SILE as well.

@Witiko Witiko changed the title Allow refences in fenced divs Allow references in fenced divs May 19, 2023
@Omikhleia
Copy link
Contributor

Omikhleia commented May 29, 2023

a review would be appreciated. I suppose you may want this in SILE as well.

Good catch...
It also seems to fix footnotes in fenced divs (with the notes=true extension)

::: {.cit custom-style=raggedleft}
I am a _fenced_ div with a note[^1]

[^1]: My note

:::

Before, such notes were not parsed and rendered, with the proposed change it seems to me they also work now.
(N.B. The blank line after the footnote content is needed, but it seems to be the case too with Pandoc.)

Maybe it could be added to the non-regression tests too, to ensure it stays covered?

EDIT:

but it seems to be the case too with Pandoc.

Confirmed at least with Pandoc 2.18.

@Witiko Witiko changed the title Allow references in fenced divs Allow references and notes in fenced divs Sep 27, 2023
@Witiko
Copy link
Collaborator Author

Witiko commented Sep 27, 2023

Maybe it could be added to the non-regression tests too, to ensure it stays covered?

Good thinking, I added a test for notes in fenced divs. Thank you for the review.

@Witiko Witiko merged commit 75f61d0 into master Sep 27, 2023
2 checks passed
@Witiko Witiko deleted the fix/fenced-div-references branch September 27, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants