diff --git a/public/faq.html b/public/faq.html index 1fd6024b..7fe54105 100644 --- a/public/faq.html +++ b/public/faq.html @@ -655,7 +655,7 @@ - + diff --git a/public/js/faq.js b/public/js/faq.js index 7967909d..2b194747 100644 --- a/public/js/faq.js +++ b/public/js/faq.js @@ -2918,11 +2918,16 @@ function setupModalListeners() { */ function renderInlineFAQs() { const container = document.getElementById('inline-faq-container'); - if (!container) return; + if (!container) { + console.error('[FAQ] inline-faq-container not found'); + return; + } // Get top 6 most important FAQs (mix of all audiences) const topFAQs = FAQ_DATA.filter(faq => [19, 12, 27, 13, 1, 2].includes(faq.id)); + console.log(`[FAQ] Rendering ${topFAQs.length} inline FAQs (marked available: ${typeof marked !== 'undefined'})`); + // Sort by ID to maintain order const sorted = topFAQs.sort((a, b) => a.id - b.id); @@ -2977,7 +2982,17 @@ function createInlineFAQItemHTML(faq) { // Parse markdown answer let answerHtml = faq.answer; if (typeof marked !== 'undefined') { - answerHtml = marked.parse(faq.answer); + try { + answerHtml = marked.parse(faq.answer); + } catch (error) { + console.error('[FAQ] Inline markdown parsing failed for FAQ', faq.id, error); + // Fallback to plain text with line breaks + answerHtml = `

${faq.answer.replace(/\n\n/g, '

').replace(/\n/g, '
')}

`; + } + } else { + console.warn('[FAQ] marked.js not loaded for inline FAQs - using plain text'); + // Fallback to plain text with line breaks + answerHtml = `

${faq.answer.replace(/\n\n/g, '

').replace(/\n/g, '
')}

`; } return ` diff --git a/public/service-worker.js b/public/service-worker.js index 41cc10c2..9196b702 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -5,7 +5,7 @@ * - PWA functionality */ -const CACHE_VERSION = '1.0.4'; +const CACHE_VERSION = '1.0.5'; const CACHE_NAME = `tractatus-v${CACHE_VERSION}`; const VERSION_CHECK_INTERVAL = 3600000; // 1 hour in milliseconds diff --git a/public/version.json b/public/version.json index 6135483c..7d6f5153 100644 --- a/public/version.json +++ b/public/version.json @@ -1,12 +1,12 @@ { - "version": "1.0.4", - "buildDate": "2025-10-14T13:00:00Z", + "version": "1.0.5", + "buildDate": "2025-10-14T13:15:00Z", "changelog": [ - "Fixed modal scrolling - changed to h-[85vh] with min-h-0 for proper flex scroll", - "Removed Quick Actions section from FAQ page", - "Standardized footer across all pages with newsletter link", - "Enhanced markdown parsing with error handling" + "Fixed inline FAQ markdown rendering with error handling", + "Added logging for FAQ rendering diagnostics", + "Enhanced markdown fallback for both modal and inline FAQs", + "Created inst_040: 'all' keyword requires complete coverage" ], "forceUpdate": true, - "minVersion": "1.0.4" + "minVersion": "1.0.5" }