Skip to main content

parse_highlight

Function parse_highlight 

Source
pub fn parse_highlight(
    passage: &str,
    tags: &[&[String]],
    max_chars: usize,
    attached: &[Attachment],
) -> Content
Expand description

What a highlight (NIP-84) shows: passage is what it marks, and tags say the rest. What its author said of the passage (its comment) is read as a note is, cut at max_chars; the passage is kept as it was marked, and not read for anything: it is somebody else’s words.

Where it is from is what is marked source, or else the note it names, the article, or the address, in that order. A note is set aside as a quoted one is, and shows under it. A page on the web is the page previewed, and the link that Space opens.