mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:22:45 +00:00 
			
		
		
		
	 0a21c2bace
			
		
	
	
		0a21c2bace
		
	
	
	
	
		
			
			From the commonmark spec: A list is loose if any of its constituent list items are separated by blank lines, or if any of its constituent list items directly contain two block-level elements with a blank line between them. Otherwise a list is tight. (The difference in HTML output is that paragraphs in a loose list are wrapped in <p> tags, while paragraphs in a tight list are not.)
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			398 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			398 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/StringView.h>
 | |
| #include <AK/Vector.h>
 | |
| 
 | |
| namespace Markdown {
 | |
| 
 | |
| class Block {
 | |
| public:
 | |
|     virtual ~Block() { }
 | |
| 
 | |
|     virtual String render_to_html(bool tight = false) const = 0;
 | |
|     virtual String render_for_terminal(size_t view_width = 0) const = 0;
 | |
| };
 | |
| 
 | |
| }
 |