Don't hyphenate link

This commit is contained in:
Laurenz 2023-02-07 12:01:31 +01:00
parent ef44c3848a
commit a0674990d3

View File

@ -1,5 +1,5 @@
use crate::prelude::*;
use crate::text::TextNode;
use crate::text::{Hyphenate, TextNode};
/// # Link
/// Link to a URL or another location in the document.
@ -109,6 +109,8 @@ impl Show for LinkNode {
impl Finalize for LinkNode {
fn finalize(&self, realized: Content) -> Content {
realized.styled(Meta::DATA, vec![Meta::Link(self.dest.clone())])
realized
.styled(Meta::DATA, vec![Meta::Link(self.dest.clone())])
.styled(TextNode::HYPHENATE, Hyphenate(Smart::Custom(false)))
}
}