fix: resolve CSS embedding import error in HTML template generation
Fixed critical bug where CSS files were not being embedded inline due to missing Path import in _generate_html_template method. This was causing CSS content to fall back to link tags instead of inline embedding. The issue was: - Path used in CSS handling code (line 367) before being imported - Path import was conditional and occurred later in the method (line 623) - Exception handling silently fell back to link tags Solution: - Added explicit `from pathlib import Path` import at method start - CSS files now properly embed inline as intended - All CSS-related tests now pass (6/6 previously failing) This resolves the test failures where CSS content was expected to be embedded inline but was generating link tags instead. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
ed27dee5a0
commit
6df6430b72
1 changed files with 1 additions and 0 deletions
|
|
@ -355,6 +355,7 @@ class DocumentManager:
|
||||||
edit_mode: bool = False, editor_theme: str = 'github', keyboard_shortcuts: bool = True) -> str:
|
edit_mode: bool = False, editor_theme: str = 'github', keyboard_shortcuts: bool = True) -> str:
|
||||||
"""Generate HTML template with embedded markdown and client-side rendering."""
|
"""Generate HTML template with embedded markdown and client-side rendering."""
|
||||||
import json
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
# Escape the markdown content for JavaScript
|
# Escape the markdown content for JavaScript
|
||||||
js_markdown_content = json.dumps(markdown_content)
|
js_markdown_content = json.dumps(markdown_content)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue