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

Is "footnote" supported in marked.js? #714

Closed
alston19 opened this issue Jan 30, 2016 · 18 comments
Closed

Is "footnote" supported in marked.js? #714

alston19 opened this issue Jan 30, 2016 · 18 comments
Labels
good first issue Something easy to get started with parser: GFM

Comments

@alston19
Copy link

It doesn't work when I input :

hello1

Footnotes

  1. hi

@ariabuckles
Copy link

No, footnotes are a non-standard markdown extension and aren't supported, sorry!

@alston19
Copy link
Author

alston19 commented Feb 2, 2016

Okay, thanks for answering. Maybe I can implement it myself.

@SHxKM
Copy link

SHxKM commented Oct 10, 2019

@alston19 I know it's been long but I'm wondering whether you found a solution to this?

@alston19
Copy link
Author

@SHxKM sorry but no 😂

@UziTech
Copy link
Member

UziTech commented Nov 7, 2019

@SHxKM check out #1562 (comment) to find some code that should work to add footnotes.

@splch
Copy link

splch commented Sep 30, 2021

Github flavored markdown now supports footnotes (https://github.blog/changelog/2021-09-30-footnotes-now-supported-in-markdown-fields/). Does that mean it's now time to implement this feature?

@UziTech
Copy link
Member

UziTech commented Sep 30, 2021

@splch If you want to implement this it would probably be accepted now. It would be better if GitHub would add it to the GFM spec so we could know the edge cases but it looks like they haven't updated the spec in a while. ☹

Looks like there is already an issue for this. github/cmark-gfm#236

@styfle
Copy link
Member

styfle commented Oct 7, 2021

I just came across this new feature on GitHub too.

I'll reopen the issue so others coming here can find it 👍

Hopefully GitHub updates the GFM spec soon 🤞

@styfle styfle reopened this Oct 7, 2021
@UziTech
Copy link
Member

UziTech commented Oct 8, 2021

Ya it seems like there are a lot of errors with it since they don't specify what happens in edge cases.

@dminkovsky
Copy link

Until this is addressed, I've been working around by using HTML inside my markdown:

<span class="super">1</span>

Where

{
  .super {
    vertical-align: super;
    font-size: 0.8rem;
}

Not the greatest, but it works!

@xieyuheng
Copy link

xieyuheng commented Apr 6, 2023

There is markdown-it-footnote: https://github.com/markdown-it/markdown-it-footnote

  • almost ten years old.
  • 360 lines of code.
  • a lot of tests.
  • used by 59,616 projects.

You do not have to wait for github to give a spec, to implement a useful support of footnote.

@calculuschild
Copy link
Contributor

In the mean time, any user who wants this should feel free to make this into a Marked Extension .

@UziTech
Copy link
Member

UziTech commented Apr 6, 2023

@xieyuheng would you like to work on adding it to marked? PRs are always welcome 😁👍

This is open source software so anyone can work on adding footnotes in marked. Once someone who wants them in marked is willing to work on it they will be added.

@RavenColEvol
Copy link

@UziTech is this issue still open ? I would like to contribute this feature.

@UziTech
Copy link
Member

UziTech commented Oct 2, 2023

Ya go ahead. Thanks!

@RavenColEvol
Copy link

@UziTech I'll try to cover up these cases for foot note which is given in markdown-it-footnote

Normal Footnote

Here is a footnote reference,[^1] and another.[^longnote]

[^1]: Here is the footnote.

[^longnote]: Here's one with multiple blocks.

    Subsequent paragraphs are indented to show that they
belong to the previous footnote.

Inline footnote

Here is an inline note.^[Inlines notes are easier to write, since
you don't have to pick an identifier and move down to type the
note.]

output for above examples are given in there documentation (here)

@bent10
Copy link
Contributor

bent10 commented Oct 10, 2023

When considering the use of footnotes in your content, it's important to keep in mind the following accessibility and usability factors:

  1. Screen Reader Compatibility: Screen readers may not effectively convey footnotes. They tend to read the footnote number without indicating that it's a footnote or using superscript. Additionally, they may not identify the link to the footnote text.
  2. Accessibility Challenges: Footnotes pose challenges for all users on a web page. To access them, one often needs to scroll to the end of the page, read the footnote, and then click back to the main content. Not everyone is aware that they should click on the footnote at the end, potentially causing them to lose their place. Moreover, if the same footnote is repeated multiple times, clicking on the link could lead to the wrong location.

If you find it necessary to use footnotes, feel free to explore the marked-footnote extension.

@UziTech
Copy link
Member

UziTech commented Oct 23, 2023

I'm going to close this since there is an extension created

@UziTech UziTech closed this as completed Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Something easy to get started with parser: GFM
Projects
None yet
Development

No branches or pull requests