beautify: don't add extra \n after comments
This commit is contained in:
		
							parent
							
								
									ddc5cc0ccf
								
							
						
					
					
						commit
						8bbab9e0e1
					
				|  | @ -401,17 +401,12 @@ | |||
|             if (!ch) { | ||||
|                 break; | ||||
|             } else if (ch === '/' && peek() === '*') { /* css comment */ | ||||
|                 var header = indentLevel === 0; | ||||
| 
 | ||||
|                 if (isAfterNewline || header) { | ||||
|                 if (isAfterNewline) { | ||||
|                     print.newLine(); | ||||
|                 } | ||||
| 
 | ||||
|                 print.text(eatComment()); | ||||
|                 print.newLine(); | ||||
|                 if (header) { | ||||
|                     print.newLine(true); | ||||
|                 } | ||||
|             } else if (ch === '/' && peek() === '/') { // single line comment
 | ||||
|                 if (!isAfterNewline && last_top_ch !== '{') { | ||||
|                     print.trim(); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user