vscode-leetcode icon indicating copy to clipboard operation
vscode-leetcode copied to clipboard

Problem preview css not properly loaded in WSL

Open Sam0523 opened this issue 1 year ago • 1 comments

🐛 Bug Report

When using via WSL, problem preivew page did not load markdown.css properly, which leads to incorrect font settings.

图片

Left side is the problem preview of this extension. It is obvious that the monospace font is ugly NSimSun. Right side is a markdown preview, which is rendered as expected.

To Reproduce

  1. Connect VSCode to WSL.
  2. Install extension for WSL.
  3. Login and open arbitrary problem preivew.

Expected behavior

Problem preview page renders with same CSS of markdown.

Your Environment

  • os: Win11 + WSL2
  • extension settings: Mostly defaults
  • nodejs version: v20.2.0
  • vscode version: 1.78.2
  • extension version: v0.18.1

Sam0523 avatar May 28 '23 15:05 Sam0523

FYI:

It seems that the extension load the css from a wrong domain: 图片

图片

It seems that the extension tries to load a file in WSL by a host domain (file%2B.vscode-resource.vscode-cdn.net).

The correct domain in my case is vscode-remote%2Bwsl-002bopensuse-002dtumbleweed.vscode-resource.vscode-cdn.net, which is obviously related to the WSL configuration.

Sam0523 avatar May 28 '23 15:05 Sam0523