Module Rfc_extensionSource

RFC extension for odoc.

Provides tags for linking to IETF RFCs:

The extension generates links to https://www.rfc-editor.org/rfc/rfcNNNN

Sourceval prefix : string
Sourceval rfc_css : string

CSS styles for RFC references

Sourceval parse_rfc_reference : Odoc_extension_api.Comment.nestable_block_element Odoc_extension_api.Location_.with_location list -> string * [> `Anchor of string | `Section of string ] option

Parse RFC reference from tag content. Supports formats:

  • "9110" -> RFC 9110
  • "9110 Section 5.5" -> RFC 9110 Section 5.5
  • "9110 section-5.5" -> RFC 9110 with anchor #section-5.5
  • "RFC 9110" -> RFC 9110 (optional RFC prefix)
Sourceval rfc_url : string -> [< `Anchor of string | `Section of string ] option -> string

Generate URL for RFC reference

Sourceval rfc_display_text : string -> [< `Anchor of 'a | `Section of string ] option -> string

Generate display text for RFC reference

Document phase - generate RFC link