@@ -66,28 +66,22 @@ private string GetText(ChangeLog changeLog)
66
66
{
67
67
if ( changeLog == null || ! changeLog . ChangeLogItems . Any ( ) ) return string . Empty ;
68
68
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 ) ) ) ;
72
72
73
- text . Append ( GetFooter ( ) ) ;
73
+ text . AppendLine ( GetFooter ( ) ) ;
74
74
return text . ToString ( ) ;
75
75
}
76
76
77
77
private string GetWorkItemsDescriptionSection ( string sectionName , IEnumerable < ChangeLogItem > changeLogItems )
78
78
{
79
- StringBuilder text = new StringBuilder ( ) ;
79
+ StringBuilder text = new ( ) ;
80
80
if ( ! changeLogItems . Any ( ) ) return string . Empty ;
81
81
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 ") ;
87
83
foreach ( var workItem in changeLogItems )
88
- {
89
- text . Append ( GetWorkItemDescriptionLine ( workItem ) ) ;
90
- }
84
+ text . AppendLine ( GetWorkItemDescriptionLine ( workItem ) ) ;
91
85
92
86
text . AppendLine ( "\n " ) ;
93
87
return text . ToString ( ) ;
@@ -96,24 +90,17 @@ private string GetWorkItemsDescriptionSection(string sectionName, IEnumerable<Ch
96
90
private string GetWorkItemDescriptionLine ( ChangeLogItem workItem )
97
91
{
98
92
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>";
103
94
}
104
95
105
96
private string GetDescription ( string description )
106
97
{
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>" , "" ) ;
112
99
}
113
100
114
101
private string GetFooter ( )
115
102
{
116
- return $ "<br><sup> <img src='{ GetLogoTypingHard16x16Url ( ) } ' /> { GetNugetVersion ( ) } </sup>";
103
+ return $ "<br><sup> <img style='width: 16px; height: 16px;' src='{ GetLogoTypingHard16x16Url ( ) } ' /> { GetNugetVersion ( ) } </sup>";
117
104
}
118
105
}
119
106
}
0 commit comments