set sentence

This commit is contained in:
yggverse 2024-10-13 09:46:13 +03:00
parent a324fbadd8
commit ef615e2e03

View File

@ -40,16 +40,19 @@ impl Reader {
let tag = match header.level { let tag = match header.level {
parser::header::Level::H1 => TextTag::builder() parser::header::Level::H1 => TextTag::builder()
.scale(1.6) .scale(1.6)
.sentence(true)
.weight(500) .weight(500)
.wrap_mode(gtk::WrapMode::Word) .wrap_mode(gtk::WrapMode::Word)
.build(), .build(),
parser::header::Level::H2 => TextTag::builder() parser::header::Level::H2 => TextTag::builder()
.scale(1.4) .scale(1.4)
.sentence(true)
.weight(400) .weight(400)
.wrap_mode(gtk::WrapMode::Word) .wrap_mode(gtk::WrapMode::Word)
.build(), .build(),
parser::header::Level::H3 => TextTag::builder() parser::header::Level::H3 => TextTag::builder()
.scale(1.2) .scale(1.2)
.sentence(true)
.weight(400) .weight(400)
.wrap_mode(WrapMode::Word) .wrap_mode(WrapMode::Word)
.build(), .build(),
@ -74,7 +77,10 @@ impl Reader {
// Is link // Is link
if let Some(link) = Link::from(line, Some(base), Some(&TimeZone::local())) { if let Some(link) = Link::from(line, Some(base), Some(&TimeZone::local())) {
// Init new tag for link // Init new tag for link
let tag = TextTag::builder().wrap_mode(WrapMode::Word).build(); let tag = TextTag::builder()
.sentence(true)
.wrap_mode(WrapMode::Word)
.build();
// Append tag to buffer // Append tag to buffer
buffer.tag_table().add(&tag); buffer.tag_table().add(&tag);