fix: re-enabled output of <br> elements in format() method with additional class attribute to signify where it comes from
This commit is contained in:
		
							parent
							
								
									80dfe53204
								
							
						
					
					
						commit
						735de0bbf6
					
				
					 1 changed files with 7 additions and 7 deletions
				
			
		|  | @ -576,9 +576,9 @@ public final class HtmlEncoder { | |||
|                     // treat entering a SEMIBLOCK as entering a TEXT | ||||
|                     int _entering = entering == SEMIBLOCK ? TEXT : entering; | ||||
|                     for (int k = linebreaks-1; k>=0; k--) { | ||||
|                         /*if (k >= swallowBreaks && k >= _entering && k >= exiting) { | ||||
|                             ret.append("<br />"); | ||||
|                         }*/ | ||||
|                         if (k >= swallowBreaks && k >= _entering && k >= exiting) { | ||||
|                             ret.append("<br class='helma-format' />"); | ||||
|                         } | ||||
|                         ret.append(newLine); | ||||
|                     } | ||||
|                     if (exiting >= SEMIBLOCK || linebreaks > 1) { | ||||
|  | @ -807,9 +807,9 @@ public final class HtmlEncoder { | |||
| 
 | ||||
|         if (linebreaks > 0) { | ||||
|             for (int i = linebreaks-1; i>=0; i--) { | ||||
|                 /*if (i >= swallowBreaks && i > exiting) { | ||||
|                     ret.append("<br />"); | ||||
|                 }*/ | ||||
|                 if (i >= swallowBreaks && i > exiting) { | ||||
|                     ret.append("<br class='helma-format' />"); | ||||
|                 } | ||||
|                 ret.append(newLine); | ||||
|             } | ||||
|         } | ||||
|  | @ -903,7 +903,7 @@ public final class HtmlEncoder { | |||
| 
 | ||||
|                 case '\n': | ||||
|                     if (encodeNewline) { | ||||
|                         ret.append("<br />"); | ||||
|                         ret.append("<br class='helma-format' />"); | ||||
|                     } | ||||
|                     ret.append('\n'); | ||||
|                     break; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue