@@ -100,6 +100,15 @@ function isProgressLog(
100100 return 'message' in item && 'timestamp' in item ;
101101}
102102
103+ function replaceHeadersWithBold ( markdown : string ) {
104+ const headerRegex = / ^ ( # { 1 , 6 } ) \s + ( .* ) $ / gm;
105+ const boldMarkdown = markdown . replace ( headerRegex , ( _match , _hashes , content ) => {
106+ return ` **${ content } ** ` ;
107+ } ) ;
108+
109+ return boldMarkdown ;
110+ }
111+
103112function Progress ( {
104113 progress,
105114 groupId,
@@ -111,15 +120,6 @@ function Progress({
111120 progress : AutofixProgressItem | AutofixStep ;
112121 runId : string ;
113122} ) {
114- function replaceHeadersWithBold ( markdown : string ) {
115- const headerRegex = / ^ ( # { 1 , 6 } ) \s + ( .* ) $ / gm;
116- const boldMarkdown = markdown . replace ( headerRegex , ( _match , _hashes , content ) => {
117- return ` **${ content } ** ` ;
118- } ) ;
119-
120- return boldMarkdown ;
121- }
122-
123123 if ( isProgressLog ( progress ) ) {
124124 const html = progress . message . includes ( '\n' )
125125 ? marked ( replaceHeadersWithBold ( progress . message ) , {
@@ -213,7 +213,11 @@ export function ExpandableStep({
213213 } }
214214 />
215215 { activeLog && ! isExpanded && (
216- < StepHeaderDescription > { activeLog } </ StepHeaderDescription >
216+ < StepHeaderDescription
217+ dangerouslySetInnerHTML = { {
218+ __html : singleLineRenderer ( replaceHeadersWithBold ( activeLog ) ) ,
219+ } }
220+ />
217221 ) }
218222 </ StepHeaderLeft >
219223 < StepHeaderRight >
0 commit comments