( sectionHref: string | undefined, navitemHref: string | undefined, )
| 21 | } |
| 22 | |
| 23 | export function compareHref( |
| 24 | sectionHref: string | undefined, |
| 25 | navitemHref: string | undefined, |
| 26 | ) { |
| 27 | if (sectionHref && navitemHref) { |
| 28 | const [target] = navitemHref.split('#') |
| 29 | |
| 30 | return ( |
| 31 | sectionHref.endsWith(target!) || |
| 32 | // fix for relative nav path `../Text/example.html` |
| 33 | target?.endsWith(sectionHref) |
| 34 | ) |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | function compareDefinition(d1: string, d2: string) { |
| 39 | return d1.toLowerCase() === d2.toLowerCase() |
no test coverage detected