Language record
Markdown
Markdown is indexed as the section tree it draws: each heading is a section owned by its parent heading, tables and code fences are sites under the heading they sit in, and a link is a recorded use of its destination — so a documentation set's internal references and its outline are both queryable.
The registry row this page is generated from
Read at render time from the same family row the register reads, so nothing in this block can disagree with it.
- Extensions
- .md, .markdown
- Registry names
markdown- Recorded symbols
- headings · sections · tables · link targets
Relationship types this analyzer constructs
5 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.
| Relationship type | Constructed |
|---|---|
calls | ruled absent |
extends | ruled absent |
implements | ruled absent |
uses | constructed by this analyzer |
imports | constructed by this analyzer |
exports | ruled absent |
contains | constructed by this analyzer |
references | constructed by this analyzer |
overrides | ruled absent |
instantiates | ruled absent |
decorates | ruled absent |
renders | ruled absent |
mixes_in | ruled absent |
part_of | constructed by this analyzer |
5 constructed, 9 not constructed. All 9 absent types are recorded as ruled absent: the written reason and the corpus measurement behind each are in this family's completeness record. The register explains what each label means.
What this analyzer does not resolve
- A heading, a table and a code fence are sites rather than declarations, so the same construct can legitimately appear twice under one section. The first occurrence keeps its exact spelling and only the Nth repeat is disambiguated, and the numbering is per owner rather than per file — 44% of this lane's symbols share a name with another symbol in the same file, and the line already separates them. Collapsing repeats instead is not an option: before sites were published per occurrence, 1,920 of the corpus's 4,078 fenced code blocks were erased, in 406 of 738 files.
- Links resolve to a heading's ANCHOR rather than to its written wording —
#install-nowis the spelling a target is matched against, not the heading's text. A fragment naming nothing is not published at all, and a#sectionfragment only resolves inside its own file, so a table of contents pointing at another page's anchor stays unresolved rather than reaching across the tree. - The prose between the structure is not recorded and nothing is inferred from what it says. A heading's name is its display text with the ATX closing run removed per CommonMark, so a document that closes its headings and one that does not publish the same section name; a
#with no space before it is kept as part of the text.
Every line above was written against Markdown’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.
Where you meet it in a repository
Recognised by extension — .md, .markdown. Everything below is about where those files actually sit in a working repository.
- A README, a
docs/tree and the prose inside an.mdxcomponent all index the same way, so a documentation site is one family whose only structure is heading hierarchy. - One file carries both the documentation and the links between documents —
[migration](./migrate.md)is recorded as a use of that destination — so the documentation graph is a graph of files. - Links are read from a second grammar. tree-sitter-markdown models headings, lists, tables and fences as nodes but leaves inline content opaque, so the engine pre-parses every inline block with the companion inline grammar and hands the trees over; a link, image or autolink is therefore an AST fact rather than a stripped string.
Questions this index answers
Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.
- What sections does this document have, and how are they nested?
- Which links in this document point at a heading that exists here?
- Which files does this document link to?
- What does this document's front matter declare?
What the analyzer sees in code like this
# Getting started <!-- bb records: section, owned by the document -->
## Install <!-- bb records: section Install, owned by Getting started -->
Run the [setup](#install) step first. <!-- bb records: uses -> the install anchorSymbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.
Languages that turn up in the same repository
Web, data & config — the count beside each name is how many relationship types that family’s analyzer constructs.
The extensions, registry names, recorded symbols and relationship types above are the parser registry row for Markdown, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.