Fix links for code text, background of code blocks.

This commit is contained in:
Michael R Sweet 2024-12-15 11:00:30 -05:00
parent 294f5e07c5
commit 62fdf48ff9
No known key found for this signature in database
GPG Key ID: BE67C75EC81F3244

View File

@ -759,7 +759,7 @@ format_code(docdata_t *dd, // I - Document data
for (code = mmdGetFirstChild(block); code; code = mmdGetNextSibling(code)) for (code = mmdGetFirstChild(block); code; code = mmdGetNextSibling(code))
{ {
set_color(dd, DOCCOLOR_LTGRAY); 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); pdfioContentFillAndStroke(dd->st, false);
set_color(dd, DOCCOLOR_RED); set_color(dd, DOCCOLOR_RED);
@ -1414,7 +1414,7 @@ render_line(docdata_t *dd, // I - Document data
else else
pdfioContentTextShow(dd->st, UNICODE_VALUE, frag->text); 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; doclink_t *l = dd->links + dd->num_links;
// Pointer to this link record // Pointer to this link record