@@ -66,28 +66,22 @@ private string GetText(ChangeLog changeLog)
6666 {
6767 if ( changeLog == null || ! changeLog . ChangeLogItems . Any ( ) ) return string . Empty ;
6868
69- StringBuilder text = new StringBuilder ( ) ;
70- text . Append ( GetWorkItemsDescriptionSection ( "Features" , changeLog . ChangeLogItems . Where ( x => x . WorkItemType != WorkItemStatics . WORKITEM_TYPE_BUG ) ) ) ;
71- text . Append ( GetWorkItemsDescriptionSection ( "Correções" , changeLog . ChangeLogItems . Where ( x => x . WorkItemType == WorkItemStatics . WORKITEM_TYPE_BUG ) ) ) ;
69+ StringBuilder text = new ( ) ;
70+ text . AppendLine ( GetWorkItemsDescriptionSection ( "Features" , changeLog . ChangeLogItems . Where ( x => x . WorkItemType != WorkItemStatics . WORKITEM_TYPE_BUG ) ) ) ;
71+ text . AppendLine ( GetWorkItemsDescriptionSection ( "Correções" , changeLog . ChangeLogItems . Where ( x => x . WorkItemType == WorkItemStatics . WORKITEM_TYPE_BUG ) ) ) ;
7272
73- text . Append ( GetFooter ( ) ) ;
73+ text . AppendLine ( GetFooter ( ) ) ;
7474 return text . ToString ( ) ;
7575 }
7676
7777 private string GetWorkItemsDescriptionSection ( string sectionName , IEnumerable < ChangeLogItem > changeLogItems )
7878 {
79- StringBuilder text = new StringBuilder ( ) ;
79+ StringBuilder text = new ( ) ;
8080 if ( ! changeLogItems . Any ( ) ) return string . Empty ;
8181
82- text . Append ( "<br>" ) ;
83- text . AppendLine ( "\n " ) ;
84-
85- text . Append ( $ "\n # **{ sectionName } **\n ") ;
86- text . Append ( "<br>" ) ;
82+ text . AppendLine ( $ "\n # **{ sectionName } **\n ") ;
8783 foreach ( var workItem in changeLogItems )
88- {
89- text . Append ( GetWorkItemDescriptionLine ( workItem ) ) ;
90- }
84+ text . AppendLine ( GetWorkItemDescriptionLine ( workItem ) ) ;
9185
9286 text . AppendLine ( "\n " ) ;
9387 return text . ToString ( ) ;
@@ -96,24 +90,17 @@ private string GetWorkItemsDescriptionSection(string sectionName, IEnumerable<Ch
9690 private string GetWorkItemDescriptionLine ( ChangeLogItem workItem )
9791 {
9892 var description = GetDescription ( workItem . Description ) ;
99- var descriptionLine = $ "<em>**{ workItem . WorkItemId } **</em> - { description } <br>";
100- if ( description . Length > MicrosoftTeamsStatics . TEXT_SIZE_TO_BREAK_LINE )
101- return $ "<br>{ descriptionLine } <br>";
102- return descriptionLine ;
93+ return $ "<em>**{ workItem . WorkItemId } **</em> - { description } <br>";
10394 }
10495
10596 private string GetDescription ( string description )
10697 {
107- if ( description . StartsWith ( "<div>" ) )
108- description = description [ MicrosoftTeamsStatics . OPENING_DIV_SIZE ..] ;
109- if ( description . EndsWith ( "</div>" ) )
110- description = description [ 0 ..^ MicrosoftTeamsStatics . CLOSING_DIV_SIZE ] ;
111- return description ;
98+ return description . Replace ( "<div>" , "" ) . Replace ( "</div>" , "" ) . Replace ( "<br>" , "" ) ;
11299 }
113100
114101 private string GetFooter ( )
115102 {
116- return $ "<br><sup> <img src='{ GetLogoTypingHard16x16Url ( ) } ' /> { GetNugetVersion ( ) } </sup>";
103+ return $ "<br><sup> <img style='width: 16px; height: 16px;' src='{ GetLogoTypingHard16x16Url ( ) } ' /> { GetNugetVersion ( ) } </sup>";
117104 }
118105 }
119106}
0 commit comments