Skip to content

Commit f82c8ba

Browse files
committed
feat: inject webview style in defaultStyle #41
1 parent 3c468e8 commit f82c8ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/manager/webview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { webviewHTMLBakPath, webviewHTMLPath } from '../path'
55
import { escapeQuote, generateStyleFromObject } from '../utils'
66
import { BaseFileManager } from './base'
77

8-
const entry = `'<!DOCTYPE html>\\n' + newDocument.documentElement.outerHTML`
8+
const entry = `blockquote {`
99

1010
const defaultMonospaceSelector: string[] = ['.font-mono', 'code', 'pre', '.mono', '.monospace', 'kbd']
1111
const defaultSansSerifSelector: string[] = ['.font-sans', '.github-markdown-body']
@@ -49,7 +49,7 @@ export class WebViewFileManager extends BaseFileManager {
4949
return fixSha256(
5050
content.replace(
5151
entry,
52-
`${entry}.replace('</body>', '</body><style>${getCSS()}</style>')`,
52+
`${getCSS()}\n\n\t\t\t${entry}`,
5353
),
5454
)
5555
}

0 commit comments

Comments
 (0)