Source
module Source
| Assembly | Nacara.Plugin.Rocq |
Renders byte ranges of a Rocq source file as HTML. Decoding the HTML gives back the exact source text.
Declared inside
Ref |
A reference site on a page |
Functions and values
encode (value: string) : string
encode (value: string) : stringEncodes text for an element or a double-quoted attribute. A prime stays literal, so an anchor and its links compare equal as written.
lines (html: string) : string array
lines (html: string) : string arrayAn HTML fragment's lines. Each keeps its newline and balances its own tags, and the concatenated text equals the fragment's text.
render (file: RocqFile) (refAt: Span -> Ref option) (span: Span) : string
render (file: RocqFile) (refAt: Span -> Ref option) (span: Span) : stringRenders span, with keywords and comments marked and a data-ref element at each reference and binder site
refAt keys. An overlapping site after the first is rendered as plain text.
| Parameter | |
|---|---|
file |
The file holding the span. |
refAt |
The key of a reference or binder site, or None to render it as plain text. |
span |
The byte range. It must fall on UTF-8 character boundaries. |