summaryrefslogtreecommitdiff
path: root/src/model/items.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-18 11:23:56 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-18 11:23:56 +0100
commitc3895cbd66688c8d677d5795813432b9a72b3ef9 (patch)
treef8b6338076ed21db80cc706ce2be6e98a1626276 /src/model/items.rs
parentddb617390cf7150042726742749806eab6b3dd54 (diff)
Remove `Target` enum
Diffstat (limited to 'src/model/items.rs')
-rw-r--r--src/model/items.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/model/items.rs b/src/model/items.rs
index 40f32fc4..a2c61933 100644
--- a/src/model/items.rs
+++ b/src/model/items.rs
@@ -5,7 +5,7 @@ use std::num::NonZeroUsize;
use comemo::Tracked;
use once_cell::sync::OnceCell;
-use super::{Content, StyleChain};
+use super::{Content, NodeId, StyleChain};
use crate::diag::SourceResult;
use crate::frame::Frame;
use crate::geom::{Abs, Dir};
@@ -54,6 +54,10 @@ pub struct LangItems {
pub linebreak: fn(justify: bool) -> Content,
/// Plain text without markup.
pub text: fn(text: EcoString) -> Content,
+ /// The id of the text node.
+ pub text_id: NodeId,
+ /// Get the string if this is a text node.
+ pub text_str: fn(&Content) -> Option<&str>,
/// A smart quote: `'` or `"`.
pub smart_quote: fn(double: bool) -> Content,
/// A paragraph break.