News for hackers. Stuff that matters.
Re:Footnotes now supported in GitHub Markdown by c-smile on Thursday September 30, 2021 @03:29PM (#28710290)
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.
Re:Footnotes now supported in GitHub Markdown by erdo on Thursday September 30, 2021 @04:02PM (#28710648)
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

Re:Footnotes now supported in GitHub Markdown by erdo on Thursday September 30, 2021 @04:37PM (#28711022)
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)
Re:Footnotes now supported in GitHub Markdown by mstade on Thursday September 30, 2021 @03:34PM (#28710356)
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.
Re:Footnotes now supported in GitHub Markdown by c-smile on Thursday September 30, 2021 @06:55PM (#28712299)
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
Re:Footnotes now supported in GitHub Markdown by mstade on Sunday October 03, 2021 @09:56AM (#28737167)
We 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.
Re:Footnotes now supported in GitHub Markdown by CyberShadow on Thursday September 30, 2021 @04:08PM (#28710727)
You can already do this with HTML, if you want to:

### <a id="about"></a>What is all this about?

Re:Footnotes now supported in GitHub Markdown by c-smile on Thursday September 30, 2021 @06:49PM (#28712267)
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?
Re:Footnotes now supported in GitHub Markdown by maddyboo on Thursday September 30, 2021 @10:40PM (#28713896)
It’s the “wrong element” but if the goal is to scroll to a given vertical position then it works.
Re:Footnotes now supported in GitHub Markdown by toastal on Thursday September 30, 2021 @10:57PM (#28713975)
You could choose AsciiDoc instead which lets you choose your own IDs and is supported on GitHub and GitLab