First attempt at text markup.

This commit is contained in:
Tom Alexander
2023-04-22 19:34:13 -04:00
parent 0b3f414ecf
commit 9a3bde0d80
4 changed files with 76 additions and 41 deletions

View File

@@ -1,6 +1,6 @@
use super::object::Object;
use super::object::TextMarkup;
use super::source::Source;
use super::PlainText;
#[derive(Debug)]
pub struct Paragraph<'s> {
@@ -97,7 +97,7 @@ pub struct LatexEnvironment<'s> {
impl<'s> Paragraph<'s> {
pub fn of_text(input: &'s str) -> Self {
let mut objects = Vec::with_capacity(1);
objects.push(Object::TextMarkup(TextMarkup { source: input }));
objects.push(Object::PlainText(PlainText { source: input }));
Paragraph {
source: input,
children: objects,