Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: HelgeSverre/token
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.14
Choose a base ref
...
head repository: HelgeSverre/token
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.3.15
Choose a head ref
  • 10 commits
  • 21 files changed
  • 1 contributor

Commits on Jan 9, 2026

  1. feat: add HTML file preview support

    Extends the existing markdown preview infrastructure to support HTML files:
    
    - Added content_to_preview_html() that branches on language type:
      - Markdown: renders via pulldown-cmark with theming and scroll sync
      - HTML: displays raw content directly in webview
    - HTML fragments are wrapped in minimal document structure
    - Complete HTML documents (with doctype/html tag) are used as-is
    - Added LanguageId::supports_preview() method for Markdown and HTML
    - Updated sync_webviews() to use the new unified function
    - Added tests for all preview content scenarios
    HelgeSverre committed Jan 9, 2026
    Configuration menu
    Copy the full SHA
    17b2297 View commit details
    Browse the repository at this point in the history
  2. feat: enhanced HTML preview with local resource loading

    1. Preview follows tab switching:
       - When switching tabs, preview now updates to show the new file
         (if it supports preview) instead of closing
       - For non-previewable files, preview is still closed
    
    2. Local resource loading for HTML preview:
       - Implemented custom 'token://' protocol handler
       - HTML files can now load relative resources (CSS, JS, images)
       - Resources are served from the document's parent directory
       - Security: path traversal attacks are prevented
       - Supports common MIME types (images, fonts, scripts, styles)
    
    3. WebviewManager refactored:
       - New PreviewContent enum: Html vs HtmlFile (with base_dir)
       - Protocol handler serves buffer content + local resources
       - Thread-safe shared state for protocol callbacks
    HelgeSverre committed Jan 9, 2026
    Configuration menu
    Copy the full SHA
    8b3a634 View commit details
    Browse the repository at this point in the history
  3. chore: release v0.3.15

    HelgeSverre committed Jan 9, 2026
    Configuration menu
    Copy the full SHA
    5ed437f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    38238c6 View commit details
    Browse the repository at this point in the history
  5. style: format code

    HelgeSverre committed Jan 9, 2026
    Configuration menu
    Copy the full SHA
    3f88b2b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    41e0424 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d90e000 View commit details
    Browse the repository at this point in the history
  8. style: format tests

    HelgeSverre committed Jan 9, 2026
    Configuration menu
    Copy the full SHA
    ce2696f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ae18b05 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7c3d861 View commit details
    Browse the repository at this point in the history
Loading