Skip to content

Commit

Permalink
chore: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
emotionbug committed Jun 13, 2024
1 parent b648de0 commit 87026e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/PdfRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ function renderParagraph(tokens: Token[], renderState: RenderState) {
// });
// }

// todo: apply style https://prismjs.com/themes/prism-okaidia.css
function renderCode(code: string, infostring: string | undefined, escaped: boolean, renderState: RenderState): void {
const prevFont = renderState.doc.getFont();
const prevFontSize = renderState.doc.getFontSize();
Expand Down Expand Up @@ -244,8 +245,11 @@ function renderCode(code: string, infostring: string | undefined, escaped: boole
leftPadding: 5,
rightPadding: 5
}, rects)
} else {
// todo: If not exists
}

renderState.y += 10;
renderState.doc.setFont(prevFont.fontName, prevFont.fontStyle);
renderState.doc.setFontSize(prevFontSize);
}
Expand Down

0 comments on commit 87026e6

Please sign in to comment.