//! Hyperlinking. use super::prelude::*; use super::TextNode; use crate::util::EcoString; /// Link text and other elements to an URL. #[derive(Debug, Hash)] pub struct LinkNode { /// The url the link points to. pub url: EcoString, /// How the link is represented. pub body: Template, } #[class] impl LinkNode { /// The fill color of text in the link. Just the surrounding text color /// if `auto`. pub const FILL: Smart = Smart::Auto; /// Whether to underline link. pub const UNDERLINE: bool = true; fn construct(_: &mut EvalContext, args: &mut Args) -> TypResult