• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / e1f834bd916861c1418cb5c321609504f77c8e72

16 Jan 2026 02:08PM UTC coverage: 53.19% (+0.4%) from 52.832%
e1f834bd916861c1418cb5c321609504f77c8e72

Pull #22887

github

web-flow
Merge 2cb556c24 into 36a71a2d0
Pull Request #22887: Add a new key for step attribute and adapt the relevant code and make…

8774 of 16370 branches covered (53.6%)

Branch coverage included in aggregate %.

5 of 135 new or added lines in 14 files covered. (3.7%)

42 existing lines in 4 files now uncovered.

32905 of 61988 relevant lines covered (53.08%)

46516.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/js/src/structured-data-blocks/shared-utils/convertToHTMLString.js
1
import { renderToString } from "@wordpress/element";
2

3
/**
4
 * Converts an array of HTML strings or elements to a single HTML string.
5
 * @param {Array|string} contents The contents to convert.
6
 * @returns {string} The resulting HTML string.
7
 */
NEW
8
export const convertToHTMLString = ( contents ) => {
×
NEW
9
        if ( ! Array.isArray( contents ) ) {
×
NEW
10
                return contents;
×
11
        }
NEW
12
        return contents.map( ( item ) => {
×
NEW
13
                if ( ! item ) {
×
NEW
14
                        return "";
×
15
                }
16

NEW
17
                if ( typeof item === "string" ) {
×
NEW
18
                        return item;
×
19
                }
NEW
20
                return renderToString( item );
×
21
        } ).join( "" );
22
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc