Skip to content

Commit

Permalink
Fix HTML input processing
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Jan 16, 2024
1 parent 8a063e1 commit c23cda9
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,13 @@ public static function parse_html5_dat_testfile( $filename ) {
}

if ( $yield_test ) {
yield array( $test_line_number, $test_context_element, $test_html, $test_dom );
yield array(
$test_line_number,
$test_context_element,
// Remove the trailing newline
substr( $test_html, 0, -1 ),
$test_dom

Check failure on line 178 in tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

There should be a comma after the last array item in a multi-line array.
);
}
}

Expand Down Expand Up @@ -238,6 +244,12 @@ public static function parse_html5_dat_testfile( $filename ) {
fclose( $handle );

// Return the last result when reaching the end of the file.
return array( $line_number, $test_context_element, $test_html, $test_dom );
return array(
$test_line_number,
$test_context_element,
// Remove the trailing newline
substr( $test_html, 0, -1 ),
$test_dom

Check failure on line 252 in tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

There should be a comma after the last array item in a multi-line array.
);
}
}

0 comments on commit c23cda9

Please sign in to comment.