Files
markdig/site/docs/extensions/definition-lists.md
Alexandre Mutel 74f429c427 Add comprehensive documentation site
Create a full Lunet-based documentation site in site/ with:
- Site config, navigation, landing page with hero section
- Core docs: getting started, usage guide, CommonMark reference
- Extension docs: 19 pages covering all 30+ extensions
- Developer guide: AST, pipeline, creating extensions, block/inline
  parsers, renderers, performance
- API reference generation via lunet-io/templates
- Remove obsolete parsing-*.md files (content revised into docs/)
- Update AGENTS.md with website build instructions
- Add site/AGENTS.md with site-specific guidance
2026-02-21 23:50:30 +01:00

1.5 KiB

title
title
Definition lists

Definition lists

Enable with .UseDefinitionLists() (included in UseAdvancedExtensions()).

Definition lists render as <dl> / <dt> / <dd> HTML elements. Inspired by PHP Markdown Extra.

Syntax

A definition list consists of terms followed by their definitions. Definitions are prefixed with : (colon followed by a space):

Term 1
:   Definition of term 1.

Term 2
:   Definition of term 2.
:   Another definition of term 2.
Term 1
Definition of term 1.
Term 2
Definition of term 2.
Another definition of term 2.

Multi-line definitions

Definitions can span multiple lines and contain block-level content:

Apple
:   A fruit that grows on trees.

    Apples come in many varieties including
    Granny Smith and Fuji.

Orange
:   A citrus fruit.
Apple
A fruit that grows on trees.

Apples come in many varieties including Granny Smith and Fuji.

Orange
A citrus fruit.

Multiple terms per definition

Term A
Term B
:   Shared definition for both terms.
Term A
Term B
Shared definition for both terms.

HTML output

<dl>
  <dt>Term 1</dt>
  <dd>Definition of term 1.</dd>
  <dt>Term 2</dt>
  <dd>Definition of term 2.</dd>
  <dd>Another definition of term 2.</dd>
</dl>

Rules

  • There must be a blank line before the first term (or it will be treated as a paragraph).
  • The : marker must be followed by at least one space.
  • Continuation lines must be indented.