mirror of
https://github.com/withastro/astro.git
synced 2025-03-31 23:31:30 -05:00
[ci] format
This commit is contained in:
parent
ba2b14cc28
commit
6b541ec468
2 changed files with 5 additions and 6 deletions
|
@ -126,12 +126,11 @@ function isPublicRoute(file: URL, config: AstroConfig): boolean {
|
|||
|
||||
// Normalize the file directory path by removing the pagesDir prefix if it exists,
|
||||
// otherwise remove the rootDir prefix.
|
||||
const normalizedDir = fileDir.startsWith(pagesDir) ? fileDir.slice(pagesDir.length) : fileDir.slice(rootDir.length);
|
||||
const normalizedDir = fileDir.startsWith(pagesDir)
|
||||
? fileDir.slice(pagesDir.length)
|
||||
: fileDir.slice(rootDir.length);
|
||||
|
||||
const parts = normalizedDir
|
||||
.replace(pagesDir.toString(), '')
|
||||
.split('/')
|
||||
.slice(1);
|
||||
const parts = normalizedDir.replace(pagesDir.toString(), '').split('/').slice(1);
|
||||
|
||||
for (const part of parts) {
|
||||
if (part.startsWith('_')) return false;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { before, describe, it } from 'node:test';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import testAdapter from './test-adapter.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
|
||||
describe('Projects with a underscore in the folder name', () => {
|
||||
let fixture;
|
||||
|
|
Loading…
Add table
Reference in a new issue