directives: add optional placeholder for markdown
This commit is contained in:
		
							parent
							
								
									d6af389f21
								
							
						
					
					
						commit
						498d0af6a4
					
				
					 3 changed files with 13 additions and 6 deletions
				
			
		|  | @ -10,11 +10,16 @@ angular.module('quay').factory('UtilService', ['$sanitize', function($sanitize) | |||
|   }; | ||||
| 
 | ||||
|   utilService.getMarkedDown = function(string) { | ||||
|     return Markdown.getSanitizingConverter().makeHtml(string || ''); | ||||
|     return html = Markdown.getSanitizingConverter().makeHtml(string || ''); | ||||
|   }; | ||||
| 
 | ||||
|   utilService.getFirstMarkdownLineAsText = function(commentString) { | ||||
|     if (!commentString) { return ''; } | ||||
|   utilService.getFirstMarkdownLineAsText = function(commentString, placeholderNeeded) { | ||||
|     if (!commentString) { | ||||
|       if (placeholderNeeded) { | ||||
|         return '<p style="visibility:hidden">placeholder</p>'; | ||||
|       } | ||||
|       return ''; | ||||
|     } | ||||
| 
 | ||||
|     var lines = commentString.split('\n'); | ||||
|     var MARKDOWN_CHARS = { | ||||
|  |  | |||
		Reference in a new issue