-
Notifications
You must be signed in to change notification settings - Fork 196
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
Obscure warning when heading directly preceded by footnotes #352
Comments
Heya, its not just that it ends with a heading, its because the heading is directly followed by the footnotes that by default are preceded by a transition (i.e. a line |
It would be difficult to exactly check for this scenario during parsing (and IMO you shouldn't really be using a headings for footnotes 😬), so I think just noting this in the documentation may need to suffice |
Thanks for the explanation :)
Agreed about a note in the documentation. I might also go one step further and advocate for a change in the default value for This actually came up in our project not from footnotes, but from our intentional abuse of the footnote syntax for setting up references for a single html page. I've also seen the
and runs into this problem. Just a thought though - I certainly understand the aesthetic argument for including the transition by default (it does look nice!) |
Thanks for the feedback 👍 |
Two bad things (1 Error and 1 warning) appear by
To solve this warning, you just need to suppress this warning by adding the following code to your suppress_warnings = [
This is also another issue when you add the directive |
Describe the bug
When trying build a document via sphinx that ends with a heading, I see the following warning:
The warning makes it seem like there was a problem parsing the metadata at the front of the file, when the problem is (or seems to be, anyway) that the file ends with a heading.
To Reproduce
I noticed this when trying to build files that had heading to denote the footnotes or references. For example:
This file was included in a project using the
myst_nb
sphinx extension, and the warning above would appear during the sphinx build process.If you delete the
## Footnotes
, the warning disappears, so my hypothesis was that themyst-parser
doesn't allow you to end documents with headings.Expected behavior
Either allow a document to end with headings, or explicitly catch the "document's shouldn't end with a heading" pattern and raise an error/warning with a specific message to that effect.
Environment
jupyter-book --version
:myst_nb
: 0.12.0myst_parser
: 0.13.6Additional context
I wasn't sure if this should be reported to
myst_nb
or here, but in the end it seemed like the root cause was something to do with the markdown parsing. If not, please feel free to transfer the issue to a more appropriate repo. If there are problems transferring, LMK and I'd be happy to close this and open a new issue elsewhere.The text was updated successfully, but these errors were encountered: