9 ms·
Footnotes now supported in GitHub Markdown
- theden 5y agoIs this a GitHub-specific feature or is it something defined in the MarkDown spec?
- zlsa 5y agoIt'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 https://www.markdownguide.org/extended-syntax/#footnotes
- sandyarmstrong 5y agoBut do note it's not part of CommonMark yet: https://spec.commonmark.org/current/ https://spec.commonmark.org/current/ I hope it gets there. I like this feature. :-)
- eevilspock 5y agoMake your desire known on the CommonMark forum topic on this: https://talk.commonmark.org/t/footnotes-now-supported-by-githubs-web-interface/3983?u=vas https://talk.commonmark.org/t/footnotes-now-supported-by-git...
- chrysoprace 5y agoI think CommonMark misses the mark (pardon the pun) by not having tables as part of the spec. Mind you, GFM tables leave much to be desired, but I'm constantly writing tables in my notes and it's frustrating to not see this supported in CommonMark.
- eslaught 5y agoIs this implemented in cmark-gfm? https://github.com/github/cmark-gfm https://github.com/github/cmark-gfm
- OJFord 5y agoYes, 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.2 https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm....
- eevilspock 5y agoActually it was implemented in Nov 2017, but only deployed/enabled for GitHub Pages. https://github.com/github/cmark-gfm/pull/64 https://github.com/github/cmark-gfm/pull/64 See this comment: https://github.com/github/cmark-gfm/pull/64#issuecomment-401656582 https://github.com/github/cmark-gfm/pull/64#issuecomment-401...
- encryptluks2 5y agoWhich should be dependant on your static site generator. I feel like GitLab stays 2 years ahead of GitLab.
- brundolf 5y agoIt'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 5y agoMarkdown 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 5y agoGitHub-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.
- daxelrod 5y agoWhat's interesting about that is that John Gruber uses footnotes extensively in his own blog posts (and has since approximately 2005), but chooses to implement them with HTML snippets rather than having created a dedicated Markdown syntax for them. For example, see https://daringfireball.net/2005/07/footnotes.text https://daringfireball.net/2005/07/footnotes.text
- tomrod 5y agoTo 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 5y agoI 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.
- c-smile 5y agoNot 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.
- mstade 5y agoThe 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 5y agoI 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
- mstade 5y agoWe did something similar to this, but used ~ instead, like so: ~ Definition title The definition data should be indented at the same level as the title. This let's you nest definitions also: ~ Like this Here's a nested definition. We also allowed : instead of ~ but most people seemed to prefer the latter. We didn't collapse anything in rendering though, but it's not a bad idea. The resulting markup when rendered to HTML was actual definition lists (<dl>) though, not details, so that'd either have to be done by nesting details or css magic I suppose.
- erdo 5y agoNot 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
- nixpulvis 5y agoIs https://github.github.com/gfm/ 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?
- wetpaws 5y agoAny new feature in markdown is a bad feature by definition.
- deleted 5y ago[deleted]
- bobbylarrybobby 5y agoInstead of reinventing the wheel and shoehorning basic functionality into markdown, why not just use a markup format that already “just works”, like asciidoctor?
- eitland 5y agoI think GitHub support Asciidoc already, you just have to specify it. Or is that GitLab?
- bobbylarrybobby 5y agoGitHub 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 5y agoI 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 https://github.com/github/markup/issues/1095
- masklinn 5y ago> Does GH also allow asciidoc(tor) syntax in comments and issues? No, only markdown is “native” to the platform.
- eevilspock 5y agoAsciidoc looks too much like code.
- dalrympm 5y agoDoes 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 5y agoA Markdown Rosetta Stone would be a useful tool.
- Zababa 5y agoThis might be what you want: https://babelmark.github.io/ https://babelmark.github.io/
- superkuh 5y agoYou 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.
- _ph_ 5y agoA nice addition - I wonder though why GitHub Markdown still doesn't support image resizing. Seems to be one of the most obvious feature if you embed images.
- eevilspock 5y agothat's pure presentation.
- andrew_ 5y agoThey seem to have fixed the code fence dangle render bug at the same time. That's been a sticky one for the better part of a year.
- metaphor 5y agoWow...apparently 6 years late[1] to the party? [1] https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/changelogs/archive.md#L5827 https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/chan...
- BoorishBears 5y agoWhen is Gitlab going to join the performance party?
- wibblewobble123 5y agoPandoc markdown had footnotes in 2008 when I was blogging with it.
- rcarmo 5y agoAt last. I have used footnotes in Markdown (via the Python library) for many years now, and kept trying to do so in GitHub…
- thundergolfer 5y agoAwesome. GitHub-flavoured markdown is definitely my favourite Markdown editing experience overall. That’s largely due it being 95% markdown and ‘not Markdown plus a bunch of other cool features with poor interoperability’ that you find in Notion and Confluence. Is there a proper document editor (eg. Has live preview) that is the same as GitHub-flavored Markdown such that I can copy text into Confluence or Notion and have things ‘just work’? I would use that as my editor and just copy into other places for publish.