Initial structure for unhighlighted source blocks.
This commit is contained in:
		
							parent
							
								
									d9a3b13780
								
							
						
					
					
						commit
						313313ae53
					
				| @ -9,7 +9,9 @@ use crate::intermediate::ISrcBlock; | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "src_block")] | ||||
| pub(crate) struct RenderSrcBlock {} | ||||
| pub(crate) struct RenderSrcBlock { | ||||
|     lines: Vec<String>, | ||||
| } | ||||
| 
 | ||||
| impl RenderSrcBlock { | ||||
|     pub(crate) fn new( | ||||
| @ -18,6 +20,8 @@ impl RenderSrcBlock { | ||||
|         output_file: &Path, | ||||
|         original: &ISrcBlock, | ||||
|     ) -> Result<RenderSrcBlock, CustomError> { | ||||
|         Ok(RenderSrcBlock {}) | ||||
|         Ok(RenderSrcBlock { | ||||
|             lines: original.lines.clone(), | ||||
|         }) | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -3,13 +3,18 @@ use crate::error::CustomError; | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct ISrcBlock {} | ||||
| pub(crate) struct ISrcBlock { | ||||
|     pub(crate) lines: Vec<String>, | ||||
| } | ||||
| 
 | ||||
| impl ISrcBlock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::SrcBlock<'parse>, | ||||
|     ) -> Result<ISrcBlock, CustomError> { | ||||
|         Ok(ISrcBlock {}) | ||||
|         // let contents = original.contents.
 | ||||
|         Ok(ISrcBlock { | ||||
|             lines: Vec::new(), // TODO
 | ||||
|         }) | ||||
|     } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander