mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
set sentence
This commit is contained in:
parent
a324fbadd8
commit
ef615e2e03
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user