Skip to content
OddsockLocal
Local
Source text

Notes

  • Red sock
  • Blue sock
  • 8 wordsRuns in this browser. Nothing is uploaded.

    How to use

    1. Paste the Markdown, including the # headings.
    2. Read the indented list. Deeper headings are indented two spaces per level.
    3. Check a repeated heading for the -1, -2 suffix.
    4. Paste the list back into the document where the contents should sit.

    What is Markdown table of contents?

    A table of contents is a list of the headings you already wrote, indented by level, each pointing at a GitHub-style anchor. “# Odd socks!” becomes “- [Odd socks!](#odd-socks)”. The exclamation mark stays in the label and is stripped from the anchor. “## In the dryer” is indented two spaces. A second “### In the dryer” becomes “#in-the-dryer-1”, because the first anchor of that text was already used.

    Read more

    “Odd socks in the dryer.” is not a heading. It is a paragraph, and the list is empty. That empty result means there was nothing to link, not that the page failed. Setext headings and ATX headings both count. The words inside the heading are the label, with emphasis markers removed from the visible text.

    The anchors are guessed the way GitHub guesses them: trim, lowercase, drop characters that are not letters, marks, numbers, spaces, underscores, or hyphens, then turn spaces into hyphens. They are not checked against a live repository. If your host’s slugger differs, the link can miss. This page does not rewrite the document. It only prints the list you can paste under the title.

    Use cases

    • A README author pasting a contents list under the title.
    • A docs writer checking that a second identical heading received -1.
    • An editor confirming a punctuation-only difference did not change the anchor.
    • A student seeing an empty list because the sentence was never a heading.
    • A reviewer comparing the guessed slug with the one GitHub actually generated.

    Three headings, one repeated phrase

    # Odd socks! ## In the dryer ### In the dryer

    - [Odd socks!](#odd-socks) - [In the dryer](#in-the-dryer) - [In the dryer](#in-the-dryer-1) The plain sentence with no hashes produces an empty list.

    Why use Oddsock

    Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

    Related tools

    Using this tool

    “Odd socks in the dryer.” has no heading token. Only headings become entries. Add a # if that line should appear.