Skip to content

Commit aa3a4e6

Browse files
committed
more
1 parent f5df782 commit aa3a4e6

File tree

1 file changed

+5
-10
lines changed
  • apps/svelte.dev/src/lib/server

1 file changed

+5
-10
lines changed

apps/svelte.dev/src/lib/server/llms.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ export function generate_llm_content(options: GenerateLlmContentOptions): string
4141

4242
for (const [path, document] of Object.entries(index)) {
4343
if (!path.startsWith(`docs/${section.slug}`)) continue;
44-
if (!should_include_file_llm_docs(path, options.ignore)) continue;
44+
45+
if (options.ignore?.some((pattern) => minimatch(path, pattern))) {
46+
if (dev) console.log(`❌ Ignored by pattern: ${path}`);
47+
continue;
48+
}
4549

4650
const doc_content = options.minimize
4751
? minimize_content(document.body, options.minimize)
@@ -106,15 +110,6 @@ function minimize_content(content: string, options?: Partial<MinimizeOptions>):
106110
return minimized;
107111
}
108112

109-
function should_include_file_llm_docs(path: string, ignore: string[] = []): boolean {
110-
if (ignore.some((pattern) => minimatch(path, pattern))) {
111-
if (dev) console.log(`❌ Ignored by pattern: ${path}`);
112-
return false;
113-
}
114-
115-
return true;
116-
}
117-
118113
function remove_quote_blocks(content: string, blockType: string): string {
119114
return content
120115
.split('\n')

0 commit comments

Comments
 (0)