diff --git a/library/src/text/raw.rs b/library/src/text/raw.rs index f13fd3947..101f527c9 100644 --- a/library/src/text/raw.rs +++ b/library/src/text/raw.rs @@ -10,7 +10,7 @@ use super::{FontFamily, Hyphenate, LinebreakNode, TextNode}; use crate::layout::BlockNode; use crate::prelude::*; -/// Monospaced text with optional syntax highlighting. +/// Raw text with optional syntax highlighting. #[derive(Debug, Hash)] pub struct RawNode { /// The raw text. diff --git a/src/model/items.rs b/src/model/items.rs index a2c61933d..21d45b672 100644 --- a/src/model/items.rs +++ b/src/model/items.rs @@ -66,7 +66,7 @@ pub struct LangItems { pub strong: fn(body: Content) -> Content, /// Emphasized content: `_Emphasized_`. pub emph: fn(body: Content) -> Content, - /// A raw block with optional syntax highlighting: `` `...` ``. + /// Raw text with optional syntax highlighting: `` `...` ``. pub raw: fn(text: EcoString, tag: Option, block: bool) -> Content, /// A hyperlink: `https://typst.org`. pub link: fn(url: EcoString) -> Content, diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs index 547545c7c..381ba712c 100644 --- a/src/syntax/ast.rs +++ b/src/syntax/ast.rs @@ -5,7 +5,7 @@ use std::num::NonZeroUsize; use std::ops::Deref; -use super::{NodeData, NodeKind, RawKind, Span, SyntaxNode, Unit}; +use super::{NodeData, NodeKind, RawFields, Span, SyntaxNode, Unit}; use crate::util::EcoString; /// A typed AST node. @@ -80,7 +80,7 @@ pub enum MarkupNode { Strong(Strong), /// Emphasized content: `_Emphasized_`. Emph(Emph), - /// A raw block with optional syntax highlighting: `` `...` ``. + /// Raw text with optional syntax highlighting: `` `...` ``. Raw(Raw), /// A hyperlink: `https://typst.org`. Link(Link), @@ -258,7 +258,7 @@ impl Emph { } node! { - /// A raw block with optional syntax highlighting: `` `...` ``. + /// Raw text with optional syntax highlighting: `` `...` ``. Raw } @@ -279,7 +279,7 @@ impl Raw { } /// The raw fields. - fn get(&self) -> &RawKind { + fn get(&self) -> &RawFields { match self.0.kind() { NodeKind::Raw(v) => v.as_ref(), _ => panic!("raw is of wrong kind"), diff --git a/src/syntax/highlight.rs b/src/syntax/highlight.rs index 34cce4c0d..7c0b4ac1c 100644 --- a/src/syntax/highlight.rs +++ b/src/syntax/highlight.rs @@ -147,7 +147,7 @@ pub enum Category { Emph, /// A hyperlink. Link, - /// Raw text or code. + /// Raw text. Raw, /// A label. Label, diff --git a/src/syntax/kind.rs b/src/syntax/kind.rs index 1282b592f..b3948c663 100644 --- a/src/syntax/kind.rs +++ b/src/syntax/kind.rs @@ -150,8 +150,8 @@ pub enum NodeKind { Strong, /// Emphasized content: `_Emphasized_`. Emph, - /// A raw block with optional syntax highlighting: `` `...` ``. - Raw(Arc), + /// Raw text with optional syntax highlighting: `` `...` ``. + Raw(Arc), /// A hyperlink: `https://typst.org`. Link(EcoString), /// A label: `