We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
<tags>
llms.txt
1 parent c4be25b commit 55780a6Copy full SHA for 55780a6
apps/svelte.dev/src/lib/server/llms.ts
@@ -51,8 +51,12 @@ export function generate_llm_content(options: GenerateLlmContentOptions): string
51
? minimize_content(document.body, options.minimize)
52
: document.body;
53
if (doc_content.trim() === '') continue;
54
-
55
- content += `\n# ${document.metadata.title}\n\n`;
+ // replaces <tags> with `<tags>`
+ const doc_title = document.metadata.title.replace(
56
+ /(?!`)<[a-zA-Z0-9:]+>(?!`)/g,
57
+ (m) => `\`${m}\``
58
+ );
59
+ content += `\n# ${doc_title}\n\n`;
60
content += doc_content;
61
content += '\n';
62
}
0 commit comments