Add optional spans for list blocks
This commit is contained in:
		
							parent
							
								
									7f3f3368be
								
							
						
					
					
						commit
						83995b05f4
					
				| @ -17,10 +17,16 @@ public class SimpleBlockNodeVisitor implements MarkwonVisitor.NodeVisitor<Node> | ||||
|     @Override | ||||
|     public void visit(@NonNull MarkwonVisitor visitor, @NonNull Node node) { | ||||
| 
 | ||||
|         // @since 3.0.1-SNAPSHOT we keep track of start in order to apply spans (optionally) | ||||
|         final int length = visitor.length(); | ||||
| 
 | ||||
|         visitor.ensureNewLine(); | ||||
| 
 | ||||
|         visitor.visitChildren(node); | ||||
| 
 | ||||
|         // @since 3.0.1-SNAPSHOT we apply optional spans | ||||
|         visitor.setSpansForNodeOptional(node, length); | ||||
| 
 | ||||
|         if (visitor.hasNext(node)) { | ||||
|             visitor.ensureNewLine(); | ||||
|             visitor.forceNewLine(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dimitry Ivanov
						Dimitry Ivanov