Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0bec0c4

Browse files
Vigilansjdneo
authored andcommitted
Bring mdEngine css style into result preview & present result in code tag (LeetCode-OpenSource#256)
1 parent43feaa3 commit0bec0c4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/webview/leetCodeResultProvider.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT license.
33

44
import{Disposable,ExtensionContext,ViewColumn,WebviewPanel,window}from"vscode";
5+
import{markdownEngine}from"./markdownEngine";
56

67
classLeetCodeResultProviderimplementsDisposable{
78

@@ -17,6 +18,7 @@ class LeetCodeResultProvider implements Disposable {
1718
this.panel=window.createWebviewPanel("leetcode.result","LeetCode Results",ViewColumn.Two,{
1819
retainContextWhenHidden:true,
1920
enableFindWidget:true,
21+
localResourceRoots:markdownEngine.localResourceRoots,
2022
});
2123

2224
this.panel.onDidDispose(()=>{
@@ -40,10 +42,10 @@ class LeetCodeResultProvider implements Disposable {
4042
<head>
4143
<meta charset="UTF-8">
4244
<meta name="viewport" content="width=device-width, initial-scale=1.0">
43-
<title>LeetCode Results</title>
45+
${markdownEngine.getStylesHTML()}
4446
</head>
4547
<body>
46-
<pre>${result.trim()}</pre>
48+
<pre><code>${result.trim()}</code></pre>
4749
</body>
4850
</html>`;
4951
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp