Skip to content

Commit

Permalink
Моноширинный шрифт для вставок кода Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
lintest committed Nov 14, 2021
1 parent 33f0248 commit 3f91803
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class StyleManager {
document.head.appendChild(style)
}
style.innerHTML = `\
.vanessa-code-widget, .vanessa-error-widget {\
.vanessa-code-widget, .vanessa-error-widget, .vanessa-markdown-code {\
font-family: ${fontFamily};\
font-size: ${fontSize}px;\
line-height: ${lineHeight}px;\
Expand Down
2 changes: 1 addition & 1 deletion src/vanessa-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const markdownToHTML = (value: string) => {
lang => lang.aliases?.some(a => a.toLocaleLowerCase() === alias)
)?.id || alias;
const html = await monaco.editor.colorize(value, id, {});
const element = document.createElement('span');
const element = $("span", { class: "vanessa-markdown-code" });
element.innerHTML = html;
return element;
}
Expand Down

0 comments on commit 3f91803

Please sign in to comment.