Skip to content

Commit 30d5d9c

Browse files
committed
When using the default glob for a listing, limit expansion only to inputs
1 parent cb874e6 commit 30d5d9c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/project/types/website/listing/website-listing-read.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ import { mergeConfigs } from "../../../../core/config.ts";
9494
// Defaults (a card listing that contains everything
9595
// in the source document's directory)
9696
const kDefaultListingType = ListingType.Default;
97-
const kDefaultContentsGlob = ["*"];
97+
const kDefaultContentsGlobToken = "B3049D40";
98+
const kDefaultContentsGlob = [kDefaultContentsGlobToken];
9899
const kDefaultId = "listing";
99100
const kDefaultTableFields = [
100101
kFieldDate,
@@ -483,10 +484,15 @@ async function readContents(
483484
);
484485

485486
const filterListingFiles = (globOrPath: string) => {
487+
const isDefaultGlob = globOrPath === kDefaultContentsGlobToken;
488+
if (isDefaultGlob) {
489+
globOrPath = "*";
490+
}
491+
486492
// Convert a bare directory path into a consumer
487493
// of everything in the directory
488494
const expanded = expandGlob(source, project, globOrPath);
489-
if (expanded.inputs) {
495+
if (expanded.inputs || isDefaultGlob) {
490496
// If this is a glob, expand it
491497
return filterPaths(
492498
dirname(source),

0 commit comments

Comments
 (0)