jotdown_wasm: add option to show events
provide 1:1 representation of events to help explore how events are emitted
This commit is contained in:
		
					parent
					
						
							
								f31398a796
							
						
					
				
			
			
				commit
				
					
						f3732693c6
					
				
			
		
					 2 changed files with 18 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -12,3 +12,11 @@ pub fn jotdown_render(djot: &str) -> String {
 | 
			
		|||
        .unwrap();
 | 
			
		||||
    html
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[must_use]
 | 
			
		||||
#[wasm_bindgen]
 | 
			
		||||
pub fn jotdown_parse(djot: &str) -> String {
 | 
			
		||||
    jotdown::Parser::new(djot)
 | 
			
		||||
        .map(|e| format!("{:?}\n", e))
 | 
			
		||||
        .collect()
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue