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

Hide footnotes keyline when preceded by header #4529

Merged
merged 2 commits into from
Oct 2, 2021

Conversation

broxen
Copy link
Contributor

@broxen broxen commented Oct 1, 2021

Since we're provided base styles to work "out of the box", we should consider edge cases such as this where footnotes always show their own keyline, even when preceded by a Header (which is styled with a keyline underneath)

This PR hides key-lines created by markdown-it-footnote template when footnotes are directly preceded by header, but leaves them in place when the footnotes follow regular Phrasing content.

Examples:

# References
[^1]: Shows no key-line because References header has one already

# New Page
Text goes here and whatever else

[^1]: these footnotes are not directly preceded by a header, but a paragraph and WILL show a key-line

Hide key-line created by `markdown-it-footnote` template when footnotes are directly preceded by header.

Examples:
```md
# References
[^1]: Shows no key-line because References header has one already

# New Page
Text goes here and whatever else

[^1]: these footnotes have no preceding header and will show a key-line
```
@NGPixel NGPixel merged commit 3e79577 into requarks:dev Oct 2, 2021
@broxen broxen deleted the footnotes-keyline branch October 2, 2021 04:29
jionggyu pushed a commit to jionggyu/wiki-2.5.302-patch that referenced this pull request Jul 9, 2024
Hide key-line created by `markdown-it-footnote` template when footnotes are directly preceded by header.

Examples:
```md
# References
[^1]: Shows no key-line because References header has one already

# New Page
Text goes here and whatever else

[^1]: these footnotes have no preceding header and will show a key-line
```
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.

2 participants