(mdxPath, options)
| 150 | |
| 151 | // Convert MDX file path to URL path |
| 152 | function mdxToUrl(mdxPath, options) { |
| 153 | // Remove .mdx extension |
| 154 | let urlPath = mdxPath.replace(/\.mdx$/, ''); |
| 155 | |
| 156 | // Handle index pages |
| 157 | if (urlPath.endsWith('/index')) { |
| 158 | urlPath = urlPath.slice(0, -6); |
| 159 | } |
| 160 | |
| 161 | // Optionally strip the s2/ or react-aria/ prefix |
| 162 | if (options.stripPrefix) { |
| 163 | urlPath = urlPath.replace(/^(s2|react-aria)\//, ''); |
| 164 | } |
| 165 | |
| 166 | // Optionally add .html extension |
| 167 | if (options.htmlExt) { |
| 168 | urlPath = urlPath + '.html'; |
| 169 | } |
| 170 | |
| 171 | return `${options.baseUrl}/${urlPath}`; |
| 172 | } |
| 173 | |
| 174 | // Format Axe results for display |
| 175 | function formatAxeResults(results, url, ignoredRules = new Set()) { |
no test coverage detected