summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-04-24 21:36:41 +0200
committerLaurenz <laurmaedje@gmail.com>2022-04-24 21:38:23 +0200
commit2f33ad0e0aa3d1f4a949025597bf1ea36256831f (patch)
treec98bff188e35d0836384418c7da1635660b10fe7 /src/model
parent2791f59ce2404d0483aee92b8231df95aa45b7a5 (diff)
Rename soft linebreak to justified linebreak
Diffstat (limited to 'src/model')
-rw-r--r--src/model/content.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/model/content.rs b/src/model/content.rs
index 03153684..4077f696 100644
--- a/src/model/content.rs
+++ b/src/model/content.rs
@@ -39,8 +39,8 @@ use crate::util::EcoString;
pub enum Content {
/// A word space.
Space,
- /// A forced line break. If soft (`true`), the preceding line can still be
- /// justified, if hard (`false`) not.
+ /// A forced line break. If `true`, the preceding line can still be
+ /// justified, if `false` not.
Linebreak(bool),
/// Horizontal spacing.
Horizontal(Spacing),
@@ -234,7 +234,7 @@ impl Debug for Content {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Self::Space => f.pad("Space"),
- Self::Linebreak(soft) => write!(f, "Linebreak({soft})"),
+ Self::Linebreak(justified) => write!(f, "Linebreak({justified})"),
Self::Horizontal(kind) => write!(f, "Horizontal({kind:?})"),
Self::Text(text) => write!(f, "Text({text:?})"),
Self::Quote(double) => write!(f, "Quote({double})"),
@@ -397,8 +397,8 @@ impl<'a> Builder<'a> {
Content::Space => {
self.par.weak(ParChild::Text(' '.into()), 0, styles);
}
- Content::Linebreak(soft) => {
- let c = if *soft { '\u{2028}' } else { '\n' };
+ Content::Linebreak(justified) => {
+ let c = if *justified { '\u{2028}' } else { '\n' };
self.par.destructive(ParChild::Text(c.into()), styles);
}
Content::Horizontal(kind) => {