static restructureContents(contents) {
        for (let i = 0; i < contents.length - 1; i++) {
            if (contents[i].hyperlink &&
                contents[i + 1].hyperlink &&
                contents[i].hyperlink.Uri === contents[i + 1].hyperlink.Uri) {
                if (contents[i].text[0].trimEnd().length === contents[i].text[0].length &&
                    contents[i + 1].text[0].trimStart().length === contents[i + 1].text[0].length) {
                    contents[i].text[0] += " " + contents[i + 1].text[0];
                }
                else {
                    contents[i].text[0] += contents[i + 1].text[0];
                }
                contents.splice(i + 1, 1);
                i--;
            }
        }
        return contents;
    }
//and also adjust the spacing in between the hyperlink for the edge cases
and also adjust the spacing in between the hyperlink for the edge cases
and also adjust the spacing in between the hyperlink for the edge cases
static restructureContents(contents) {
        for (let i = 0; i < contents.length - 1; i++) {
            if (contents[i].hyperlink &&
                contents[i + 1].hyperlink &&
                contents[i].hyperlink.Uri === contents[i + 1].hyperlink.Uri) {
                if (contents[i].text[0].trimEnd().length === contents[i].text[0].length &&
                    contents[i + 1].text[0].trimStart().length === contents[i + 1].text[0].length) {
                    contents[i].text[0] += " " + contents[i + 1].text[0];
                }
                else {
                    contents[i].text[0] += contents[i + 1].text[0];
                }
                contents.splice(i + 1, 1);
                i--;
            }
        }
        return contents;
    }
static restructureContents ( contents ) { for ( let i = 0 ; i < contents . length - 1 ; i ++ ) { if ( contents [ i ] . hyperlink && contents [ i + 1 ] . hyperlink && contents [ i ] . hyperlink . Uri === contents [ i + 1 ] . hyperlink . Uri ) { if ( contents [ i ] . text [ 0 ] . trimEnd ( ) . length === contents [ i ] . text [ 0 ] . length && contents [ i + 1 ] . text [ 0 ] . trimStart ( ) . length === contents [ i + 1 ] . text [ 0 ] . length ) { contents [ i ] . text [ 0 ] += " " + contents [ i + 1 ] . text [ 0 ] ; } else { contents [ i ] . text [ 0 ] += contents [ i + 1 ] . text [ 0 ] ; } contents . splice ( i + 1 , 1 ) ; i -- ; } } return contents ; }
and also adjust the spacing in between the hyperlink for the edge cases
and also adjust the spacing in between the hyperlink for the edge cases