Add word-level parsing

This commit is contained in:
Juno Takano 2025-12-18 02:20:11 -03:00
commit 198bc12507
34 changed files with 743 additions and 446 deletions

View file

@ -2,7 +2,7 @@ use std::collections::HashMap;
use serde::{Serialize, Deserialize};
use crate::syntax::content::parsers::{compound::elements::literal::Literal, line::elements::{paragraph::Paragraph, span::Span}};
use crate::syntax::content;
#[derive(Serialize, Deserialize, Clone, Default, PartialEq, Eq, Debug)]
pub struct Graph {
@ -155,14 +155,9 @@ impl Node {
impl Config {
#[must_use]
pub fn parse_text(self) -> Config {
Config {
footer_text: crate::syntax::content::parse::<Span, Literal>(
&self.footer_text,
),
about_text: crate::syntax::content::parse::<Paragraph, Literal>(
&self.about_text,
),
footer_text: content::parse(&self.footer_text),
about_text: content::parse(&self.about_text),
..self
}
}