[HN Gopher] Footnotes now supported in GitHub Markdown
       ___________________________________________________________________
        
       Footnotes now supported in GitHub Markdown
        
       Author : gampleman
       Score  : 151 points
       Date   : 2021-09-30 14:27 UTC (8 hours ago)
        
 (HTM) web link (github.blog)
 (TXT) w3m dump (github.blog)
        
       | nixpulvis wrote:
       | Is https://github.github.com/gfm/ maintained? If so I would have
       | expected to see this addition in there. On that subject, it's
       | been a while since I needed a new markdown parser but I kinda
       | like this feature, where do I find the source for the parser?
       | 
       | EDIT: OJFord answers my question below.
       | 
       | P.S. Why am I forced to watch (and re-watch) an animated GIF when
       | you could have simply shown the source and resulting rendered
       | HTML in my browser?! Meanwhile, the example code they do provide
       | is left completely without a rendered output. Must everything
       | spoon feed video these days? Madness!
       | 
       | P.S.S why is "simple" colored cyan?
        
       | brundolf wrote:
       | It's funny to watch Markdown gradually reinvent HTML as it
       | originally was (though with much more readable syntax)
       | 
       | And I don't actually think that's a bad thing, so long as it
       | stops there. HTML has become much more than documents, so having
       | a constrained subset dedicated to documents is helpful.
        
         | blacktriangle wrote:
         | Markdown hasn't changed a bit from its reference
         | implementation, it can't.
         | 
         | Everybody who grabbed onto Markdown and is forking it because
         | they're realizing that it was a very simple tool to solve one
         | man's blogging problem and ignored all the other more
         | comprehensive LWMLs is reinventing HTML.
        
           | brundolf wrote:
           | GitHub-flavored Markdown is different; it's almost taken over
           | as the de-facto standard. There are lots of wacky extensions
           | out there, but this isn't just another one of those.
        
         | nixpulvis wrote:
         | I'm personally very conservative about what I want added to
         | markdown. I use it heavily _because_ it doesn 't provide me too
         | many options.
         | 
         | That said, links and references are a nice thing to have done
         | well.
        
           | m-p-3 wrote:
           | I use Joplin to take notes, it's Markdown-based and it also
           | includes some interesting extras like Mermaid support for
           | diagrams.
           | 
           | http://joplinapp.org/
           | 
           | https://mermaid-js.github.io/
        
         | tomrod wrote:
         | To be fair, it is simpler than HTML. Like Java vs. Python. You
         | can sure do a lot with Java, but sometimes you just want the
         | beauty of Python without injection, ya know?
        
           | munch117 wrote:
           | I don't understand how you can say that. Markdown is
           | massively more complicated than the equivalent HTML. HTML
           | syntax is simple: Every gizmo is expressed as a <tag> and
           | optionally an end </tag>, there are escapes for <, > and &,
           | and that's all that ever needs escaping.
           | 
           | Markdown, on the other hand, has a syntax that is ever
           | expanding. It's all exceptions to exceptions to exceptions
           | (exceptions all the way down).
           | 
           | For example, what happens if in a markdown document talking
           | about regular expressions you have this text: [^A-Za-z]. Will
           | it be interpreted as a footnote? Or is it an exception? Who
           | knows, only trial and error will tell.
        
             | kyleee wrote:
             | And it may be handled differently between the many
             | "flavors" of markdown!
             | 
             | In my experience, with decent editor assistance to help
             | with boilerplate, closing html tags, etx. I enjoy writing
             | simple docs more in html
        
             | brundolf wrote:
             | You're talking about parsing/syntax, but what matters here
             | is semantics. (Normal) Markdown maps to a small subset of
             | all possible HTML tags, most of them on the simpler end of
             | things, and that makes its overall scope and semantics
             | simpler than those of HTML, even if its syntax is not.
        
               | munch117 wrote:
               | Means and ends. If your means are complex, but the ends
               | you are achieving are simple, then you're not getting
               | good value for money. If I am to abide complex syntax
               | then I'd better get sophisticated, powerful semantics in
               | return.
               | 
               | HTML 1.0 (no CSS, no JS, no floats) is very similar in
               | scope to Markdown. I wish every site that uses Markdown
               | would allow me to write something like HTML 1.0 instead.
               | It would be so much easier, at least for me.
        
         | stilisstuk wrote:
         | Just use restructured text (rST) already.
        
           | bobbylarrybobby wrote:
           | No, asciidoctor! Asciidoctor is the most intuitive markup
           | format there is (except maybe Pollen, but that's a non
           | starter for most people).
           | 
           | Also, rST can't even do bold italics.
        
             | jsilence wrote:
             | Nothing beats org-mode.
        
         | [deleted]
        
         | CyberShadow wrote:
         | HTML doesn't have footnotes, does it?
        
           | Diti wrote:
           | HTML 5 has the aside tag, which has the semantics of
           | footnotes.
        
             | dredmorbius wrote:
             | "Aside" is very rarely used as a footnote, and doesn't
             | inherently have footnote semantics.
             | 
             | Not even in W3C's rather underrepresented suggested usage
             | (as distinguished from common practice):
             | 
             |  _The objective of this technique is to use the HTML5 aside
             | element to indicate that it 's content is tangentially
             | related to the main article or a parent section. The aside
             | element represents a section of a page that consists of
             | content that could be considered separate from that
             | content. Such sections are often represented as sidebars in
             | printed typography._
             | 
             | https://www.w3.org/WAI/GL/wiki/Using_the_aside_element_to_i
             | n...
             | 
             | https://awkawk.github.io/using_aside_content.html
             | 
             |  _Dive Into HTML5_ anaogises  <aside> to sidebars:
             | 
             |  _The aside element represents a section of a page that
             | consists of content that is tangentially related to the
             | content around the aside element, and which could be
             | considered separate from that content. Such sections are
             | often represented as sidebars in printed typography. The
             | element can be used for typographical effects like pull
             | quotes or sidebars, for advertising, for groups of nav
             | elements, and for other content that is considered separate
             | from the main content of the page._
             | 
             | http://diveintohtml5.info/semantics.html
        
           | brundolf wrote:
           | It basically does. You can use anchors to approximate the
           | behavior described here (it will be more verbose, but that's
           | to be expected)
        
           | windthrown wrote:
           | I think people are referring to the practice of effectively
           | creating footnotes with HTML anchor tags [1]
           | 
           | [1] http://karlwinegardner.blogspot.com/2011/02/how-to-
           | create-fo...
        
       | eslaught wrote:
       | Is this implemented in cmark-gfm?
       | 
       | https://github.com/github/cmark-gfm
        
         | OJFord wrote:
         | Yes, simply look at the latest release which contains three
         | bugfixes related to footnotes:
         | 
         | https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm....
        
       | superkuh wrote:
       | You know what's not supoprted in GitHub Markdown? Anchors. There
       | are no functional anchors on any GitHub page. They have something
       | in their markdown that looks very much like anchors but instead
       | of being an actual HTML anchor it requires loading and executing
       | javascript first.
       | 
       | If github wants to actually support real markdown then footnotes
       | are good, but maybe work on supporting anchors first. They're
       | very important for readmes.
        
       | bobbylarrybobby wrote:
       | Instead of reinventing the wheel and shoehorning basic
       | functionality into markdown, why not just use a markup format
       | that already "just works", like asciidoctor?
        
         | eitland wrote:
         | I think GitHub support Asciidoc already, you just have to
         | specify it.
         | 
         | Or is that GitLab?
        
           | bobbylarrybobby wrote:
           | GitHub supports it, so I don't see why they don't just
           | encourage users to use it instead of reinventing the wheel
           | with markdown
        
             | stock_toaster wrote:
             | I thought it only rendered files in the repo (match by
             | extension). Does GH also allow asciidoc(tor) syntax in
             | comments and issues?
             | 
             | * Note: Sadly, include is not supported on GH.
             | https://github.com/github/markup/issues/1095
        
       | c-smile wrote:
       | Not sure how useful are footnotes but the lack of ability to
       | assign stable ID to headers is annoying.
       | 
       | Something like:                   ###|about What is all this
       | about?
       | 
       | And #2 in wish list is built-in support for `<details>` -
       | collapsible sections - quite useful in documentation.
        
         | CyberShadow wrote:
         | You can already do this with HTML, if you want to:
         | 
         | ### <a id="about"></a>What is all this about?
        
           | c-smile wrote:
           | In your case id is assigned to wrong element.
           | 
           | So to use                   <h3 id=about>What is all this
           | about?</h3>
           | 
           | But what's the point of using MD then?
        
         | mstade wrote:
         | The details html tag works fine on GitHub; or did you mean
         | you'd like a new syntax that's more markdownesque?
         | 
         | EDIT: Definite +1 for the stable headers id suggestion. I
         | implemented something similar in a proof of concept app a while
         | back, but it was a suffix rather than a prefix, in brackets,
         | like so:                   # About this project { #about }
         | 
         | It worked really well, and the syntax allowed for additional
         | properties like css like class syntax. Thouh we referred to
         | them as tags because they were used to tag sections, paragraphs
         | etc., so we could do some interesting aggregation later on.
        
           | c-smile wrote:
           | I would rather define some MD rule for <DL><DT><DD> and ask
           | viewers to use collapsing                   ### Properties
           | + #### innerHTML                   Get/set inner HTML content
           | + #### innerText                   Get/set content as text
           | ### Methods
        
         | erdo wrote:
         | Not sure if this helps you, and you may already be aware of it,
         | but in my gitHub pages markdown I have titles like these:
         | 
         | ## <a name="boiler-plate"></a>Removing more boiler plate
        
           | erdo wrote:
           | I just read that using "id" is the preferred way (see the
           | other reply) "name" is deprecated for this use, but it still
           | works of course (I'm not a web developer, been using the same
           | markdown trick for years)
        
       | theden wrote:
       | Is this a GitHub-specific feature or is it something defined in
       | the MarkDown spec?
        
         | zlsa wrote:
         | It's not part of the original spec for Markdown, but it looks
         | like it's a relatively standard addition to Markdown:
         | 
         | https://www.markdownguide.org/extended-syntax/#footnotes
        
           | sandyarmstrong wrote:
           | But do note it's not part of CommonMark yet:
           | https://spec.commonmark.org/current/
           | 
           | I hope it gets there. I like this feature. :-)
        
       | dalrympm wrote:
       | Does anyone know of a good reference table showing what IS
       | supported on GH vs. something like Goldmark (Hugo's default)?
       | 
       | I find that I constrain myself to the bare minimum in .md because
       | I'm not sure what is supported.
        
         | dredmorbius wrote:
         | A Markdown Rosetta Stone would be a useful tool.
        
       | [deleted]
        
       | wetpaws wrote:
       | Any new feature in markdown is a bad feature by definition.
        
       ___________________________________________________________________
       (page generated 2021-09-30 23:01 UTC)