File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ async function setUp() {
9090 return { document, definedBenchmarks, inDepthBenchmarks } ;
9191}
9292
93- function checkHasAnyBenchmarks ( { definedBenchmarks} ) {
93+ function checkHasAnyBenchmarks ( { definedBenchmarks } ) {
9494 if ( definedBenchmarks . length == 0 ) {
9595 throw new Error ( "No benchmarks defined" ) ;
9696 }
@@ -128,14 +128,10 @@ async function checkRelativeLinks({ document }) {
128128 const links = dd . querySelectorAll ( "a[href]" ) ;
129129 links . forEach ( ( link ) => {
130130 const href = link . getAttribute ( "href" ) ;
131- if ( href . startsWith ( "http" ) || href . startsWith ( "mailto:" ) || href . startsWith ( "#" ) ) {
131+ if ( href . startsWith ( "http" ) ) {
132132 return ;
133133 }
134-
135- // Handle anchors in file paths (e.g. "foo.html#bar") and query params
136- const relativePath = href . split ( "#" ) [ 0 ] . split ( "?" ) [ 0 ] ;
137- const filePath = path . join ( rootDir , relativePath ) ;
138-
134+ const filePath = path . join ( rootDir , href ) ;
139135 if ( ! fs . existsSync ( filePath ) ) {
140136 errors . push (
141137 `Broken link in in-depth.html: '${ href } ' (resolved to '${ filePath } ') does not exist.`
You can’t perform that action at this time.
0 commit comments