diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-10-18 00:02:38 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-10-18 00:04:12 +0200 |
| commit | c0e972b91a7bf8d22cd24a38fc92a9c6214c8a0c (patch) | |
| tree | 19362eb993f15ef1b9bceeac821852bb6edfe955 /src/model/content.rs | |
| parent | e21822665591dc19766275da1e185215a6b945ef (diff) | |
Reduce dependencies from compiler on library
Diffstat (limited to 'src/model/content.rs')
| -rw-r--r-- | src/model/content.rs | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/src/model/content.rs b/src/model/content.rs index 5f0536c3..428865f3 100644 --- a/src/model/content.rs +++ b/src/model/content.rs @@ -1,23 +1,24 @@ -use std::fmt::Debug; +use std::fmt::{self, Debug, Formatter}; use std::hash::Hash; use std::iter::Sum; use std::mem; use std::ops::{Add, AddAssign}; +use std::sync::Arc; use comemo::Tracked; use typed_arena::Arena; use super::{ - Barrier, CollapsingBuilder, Interruption, Key, Layout, LayoutNode, Property, Show, - ShowNode, StyleEntry, StyleMap, StyleVecBuilder, Target, + Barrier, CollapsingBuilder, Dict, Interruption, Key, Layout, LayoutNode, Property, + Regions, Selector, Show, ShowNode, StyleChain, StyleEntry, StyleMap, StyleVecBuilder, + Target, }; -use crate::diag::StrResult; +use crate::diag::{SourceResult, StrResult}; +use crate::frame::{Frame, Role}; +use crate::geom::{Length, Numeric}; use crate::library::layout::{FlowChild, FlowNode, PageNode, PlaceNode, Spacing}; -use crate::library::prelude::*; use crate::library::structure::{DocNode, ListItem, ListNode, DESC, ENUM, LIST}; -use crate::library::text::{ - DecoNode, EmphNode, ParChild, ParNode, StrongNode, UNDERLINE, -}; +use crate::library::text::{ParChild, ParNode}; use crate::util::EcoString; use crate::World; @@ -173,21 +174,6 @@ impl Content { self.clone().styled_with_entry(StyleEntry::Unguard(sel)) } - /// Make this content strong. - pub fn strong(self) -> Self { - Self::show(StrongNode(self)) - } - - /// Make this content emphasized. - pub fn emph(self) -> Self { - Self::show(EmphNode(self)) - } - - /// Underline this content. - pub fn underlined(self) -> Self { - Self::show(DecoNode::<UNDERLINE>(self)) - } - /// Add weak vertical spacing above and below the node. pub fn spaced(self, above: Option<Length>, below: Option<Length>) -> Self { if above.is_none() && below.is_none() { |
