Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis authored and astrobot-houston committed Sep 13, 2024
1 parent 633eeaa commit 878f7f6
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions packages/astro/src/core/routing/manifest/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,30 @@ export function getRouteGenerator(
trailing = '/';
}

const path = segments
.map((segment) => {
return (
'/' +
segment
.map((part) => {
if (part.spread) {
return `${sanitizedParams[part.content.slice(3)] || ''}`;
} else if (part.dynamic) {
return `${sanitizedParams[part.content] || ''}`;
} else {
return part.content
.normalize()
.replace(/\?/g, '%3F')
.replace(/#/g, '%23')
.replace(/%5B/g, '[')
.replace(/%5D/g, ']');
}
})
.join('')
);
})
.join('') + trailing;
const path =
segments
.map((segment) => {
return (
'/' +
segment
.map((part) => {
if (part.spread) {
return `${sanitizedParams[part.content.slice(3)] || ''}`;
} else if (part.dynamic) {
return `${sanitizedParams[part.content] || ''}`;
} else {
return part.content
.normalize()
.replace(/\?/g, '%3F')
.replace(/#/g, '%23')
.replace(/%5B/g, '[')
.replace(/%5D/g, ']');
}
})
.join('')
);
})
.join('') + trailing;

return path || '/';
};
Expand Down

0 comments on commit 878f7f6

Please sign in to comment.