Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
TwIStOy committed Dec 11, 2023
1 parent 6da337a commit 82b0e69
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/format/rendered-node/codeblock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function highlightContent(
});
let m = 0;
info("markers: %s", markers);
pango.addLines('<span allow_breaks="false"><tt>');
pango.addLines('<span><tt>');
for (let i = 0; i < content.length; i++) {
while (m < markers.length && markers[m].offset <= i) {
let marker = markers[m];
Expand Down
6 changes: 4 additions & 2 deletions src/core/format/rendered-node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ export class PangoMarkupGenerator {
})
.map((p) => {
if (p.kind === "markup") {
p.markup = this._addCommonTag(p.markup);
let markup = this._addCommonTag(p.markup);
p.markup = markup;
}
return p;
});
Expand All @@ -118,6 +119,7 @@ export class PangoMarkupGenerator {
if (!isNil(background)) {
openTag += ` background="#${string.format("%06x", background)}"`;
}
openTag += ` size="15pt"`;
openTag += ">";
return `${openTag}${p}</span>`;
}
Expand Down Expand Up @@ -362,7 +364,7 @@ export class CodeSpanNode extends SimpleWrapperNode {
}

openTag(): string {
return '<span allow_breaks="false"><tt>';
return '<span><tt>';
}

closeTag(): string {
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { Markup } from "@glib/widgets/markup";
import { MarkupRenderer } from "@core/format/markdown";
import { PangoMarkupGenerator } from "@core/format/rendered-node";

export { mdNode } from "@glib/widgets/markdown-doc/md-node";
export * as _ from "@glib/index";
export { AllLspServers } from "./conf/external_tools";
export { AllPlugins, LazySpecs } from "./conf/plugins";
Expand Down

0 comments on commit 82b0e69

Please sign in to comment.