Merge pull request #364 from PR0M3TH3AN/landing-meta-prompts-fix-5183825928176553704

Fix Scheduler Meta Prompts rendering on landing page
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-20 07:47:42 -05:00
commit 9614358017
2 files changed
+10 -2

No files matched your search

+10 -2
View File
@@ -1195,15 +1195,23 @@ npm install https://github.com/PR0M3TH3AN/TORCH/archive/refs/heads/main.tar.gz &
// Regex to capture content between ```text and ``` inside the headers
// strict on the header, loose on the code block language (text, markdown, or none)
const dailyMatch = text.match(/## Daily Scheduler Meta Prompt[\s\S]*?```\w*([\s\S]*?)```/);
const weeklyMatch = text.match(/## Weekly Scheduler Meta Prompt[\s\S]*?```\w*([\s\S]*?)```/);
// Using non-capturing group (?:[^\n\r]*)? for optional language hint on the same line
// followed by newline(s) to start content capture
const dailyMatch = text.match(/## Daily Scheduler Meta Prompt[\s\S]*?```(?:[^\n\r]*)?[\r\n]+([\s\S]*?)```/);
const weeklyMatch = text.match(/## Weekly Scheduler Meta Prompt[\s\S]*?```(?:[^\n\r]*)?[\r\n]+([\s\S]*?)```/);
if (dailyMatch && dailyMatch[1]) {
document.getElementById('daily-code').textContent = dailyMatch[1].trim();
} else {
console.warn('Daily prompt regex mismatch');
document.getElementById('daily-code').textContent = 'Error: Daily prompt format mismatch in META_PROMPTS.md';
}
if (weeklyMatch && weeklyMatch[1]) {
document.getElementById('weekly-code').textContent = weeklyMatch[1].trim();
} else {
console.warn('Weekly prompt regex mismatch');
document.getElementById('weekly-code').textContent = 'Error: Weekly prompt format mismatch in META_PROMPTS.md';
}
} catch (error) {
console.error('Error fetching meta prompts:', error);
Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB