mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Don't hyphenate link
This commit is contained in:
parent
ef44c3848a
commit
a0674990d3
@ -1,5 +1,5 @@
|
|||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
use crate::text::TextNode;
|
use crate::text::{Hyphenate, TextNode};
|
||||||
|
|
||||||
/// # Link
|
/// # Link
|
||||||
/// Link to a URL or another location in the document.
|
/// Link to a URL or another location in the document.
|
||||||
@ -109,6 +109,8 @@ impl Show for LinkNode {
|
|||||||
|
|
||||||
impl Finalize for LinkNode {
|
impl Finalize for LinkNode {
|
||||||
fn finalize(&self, realized: Content) -> Content {
|
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)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user