Skip to content

Commit

Permalink
Fix links for code text, background of code blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Dec 15, 2024
1 parent 294f5e0 commit 62fdf48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/md2pdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ format_code(docdata_t *dd, // I - Document data
for (code = mmdGetFirstChild(block); code; code = mmdGetNextSibling(code))
{
set_color(dd, DOCCOLOR_LTGRAY);
pdfioContentPathRect(dd->st, left - 3.0, dd->y - (LINE_HEIGHT - 1.0) * SIZE_CODEBLOCK, right - left + 3.0, lineheight);
pdfioContentPathRect(dd->st, left - 3.0, dd->y - (LINE_HEIGHT - 1.0) * SIZE_CODEBLOCK, right - left + 6.0, lineheight);
pdfioContentFillAndStroke(dd->st, false);

set_color(dd, DOCCOLOR_RED);
Expand Down Expand Up @@ -1414,7 +1414,7 @@ render_line(docdata_t *dd, // I - Document data
else
pdfioContentTextShow(dd->st, UNICODE_VALUE, frag->text);

if (frag->type == MMD_TYPE_LINKED_TEXT && frag->url && dd->num_links < DOCLINK_MAX)
if (frag->url && dd->num_links < DOCLINK_MAX)
{
doclink_t *l = dd->links + dd->num_links;
// Pointer to this link record
Expand Down

0 comments on commit 62fdf48

Please sign in to comment.