first pass of merging in warp (doesn't build)

This commit is contained in:
Ryan Ward
2026-07-01 16:08:58 -05:00
parent 2f64909469
commit 4770ac06b5
3662 changed files with 414574 additions and 89772 deletions
+12 -13
View File
@@ -1,21 +1,20 @@
use std::cell::Cell;
use std::collections::{HashMap, VecDeque};
use std::rc::Rc;
use anyhow::Result;
use serde_yaml::{Mapping, Value};
use std::{
cell::Cell,
collections::{HashMap, VecDeque},
rc::Rc,
};
use html5ever::{
Attribute, ParseOpts, parse_document, tendril::TendrilSink, tree_builder::TreeBuilderOpts,
};
use html5ever::tendril::TendrilSink;
use html5ever::tree_builder::TreeBuilderOpts;
use html5ever::{Attribute, ParseOpts, parse_document};
use markup5ever_rcdom::{Node, NodeData, RcDom};
use serde_yaml::{Mapping, Value};
use crate::markdown_parser::RUNNABLE_BLOCK_MARKDOWN_LANG;
use crate::weight::CustomWeight;
use crate::{
CodeBlockText, FormattedIndentTextInline, FormattedTaskList, FormattedText,
FormattedTextFragment, FormattedTextHeader, FormattedTextInline, FormattedTextLine,
FormattedTextStyles, Hyperlink, OrderedFormattedIndentTextInline,
markdown_parser::RUNNABLE_BLOCK_MARKDOWN_LANG, weight::CustomWeight,
};
// Top element element tags we are not parsing for right now.
@@ -558,7 +557,7 @@ fn parse_code_block_and_language(nodes: &[Rc<Node>]) -> (String, Option<String>)
(text, language)
}
// Parse a HMTL style string into its corresponding name -> value hashmap
// Parse a HTML style string into its corresponding name -> value hashmap
// For example "font-style:italic;font-weight:400" will be parsed into
// {"font-style": "italic", "font-weight": "400"}.
fn parse_style_into_dict(style: &str) -> HashMap<&str, &str> {
@@ -576,5 +575,5 @@ fn parse_style_into_dict(style: &str) -> HashMap<&str, &str> {
}
#[cfg(test)]
#[path = "html_parser_test.rs"]
#[path = "html_parser_tests.rs"]
mod tests;