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

feat: allow rendering footnotes without superscript #362

Conversation

water-sucks
Copy link
Contributor

When footnote rendering is enabled, the superscript can look a little ugly if a monospace font is in use. This allows rendering a footnote using the full, normal-size font even if the superscript option is turned off, rather than disabling rendering of footnotes entirely if the superscript option is disabled.

@water-sucks
Copy link
Contributor Author

I'm confused, this is a suggestion with nothing in it? I don't really know how to proceed...

@water-sucks
Copy link
Contributor Author

@MeanderingProgrammer can you check this out when you have the time? I'm not sure what this reviewer is doing or saying, not gonna lie

end
value = converted_value
else
value = footnote.prefix .. text .. footnote.suffix

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this change?

To inline prefix & suffix when superscript = false?

Or effectively a way to hide the ^?

If it's the latter it strikes me as unintuitive that setting superscript = false results in the ^ being hidden, this should be controlled by something more explicit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, would it be better to control the whole option for rendering footnotes in general with an enable flag that defaults to true then? Right now the rendering of the option is controlled by if superscript = true is enabled or not, which I thought to be a little unintuitive myself.

I was trying to keep within the bounds of existing options, but maybe adding an option here for enabling rendering of footnotes may be a better way of going about this then.

Copy link
Contributor Author

@water-sucks water-sucks Mar 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intent for this change was to be able to conceal the option without needing to render everything with superscript-style characters, btw. Sorry for not making that clear in my initial PR comment.

MeanderingProgrammer added a commit that referenced this pull request Mar 16, 2025
## Details

Based on: #362

Changes behavior of how footnotes are rendered.

Previously setting `superscript = false` would completely disable the
rendering of footnotes. Now this simply disables the conversion to
superscripts. The `^` will continue to be hidden and `prefix` and
`suffix` will be added to the contents.

Disabling rendering for footnotes entirely is now controlled by the new
`enabled` option under the `footnote` configuration.

Co-Authored-By: Varun Narravula <[email protected]>
@MeanderingProgrammer
Copy link
Owner

Merged this gated by an enabled flag here: 9721ffe

So having enabled = true (which it is by default) & superscript = false results in the behavior of rendering footnotes without superscripts.

Setting enabled = false disables all the footnote rendering behavior.

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