=================================================================== RCS file: /cvs/docbook2mdoc/docbook2mdoc.c,v retrieving revision 1.125 retrieving revision 1.126 diff -u -p -r1.125 -r1.126 --- docbook2mdoc/docbook2mdoc.c 2019/04/14 21:11:04 1.125 +++ docbook2mdoc/docbook2mdoc.c 2019/04/14 22:37:56 1.126 @@ -1,4 +1,4 @@ -/* $Id: docbook2mdoc.c,v 1.125 2019/04/14 21:11:04 schwarze Exp $ */ +/* $Id: docbook2mdoc.c,v 1.126 2019/04/14 22:37:56 schwarze Exp $ */ /* * Copyright (c) 2014 Kristaps Dzonsons * Copyright (c) 2019 Ingo Schwarze @@ -126,6 +126,21 @@ pnode_printtext(struct format *f, struct pnode *n) } static void +pnode_printimagedata(struct format *f, struct pnode *n) +{ + const char *cp; + + if ((cp = pnode_getattr_raw(n, ATTRKEY_FILEREF, NULL)) == NULL) + cp = pnode_getattr_raw(n, ATTRKEY_ENTITYREF, NULL); + if (cp != NULL) { + print_text(f, "[image:", ARG_SPACE); + print_text(f, cp, ARG_SPACE); + print_text(f, "]", 0); + } else + print_text(f, "[image]", ARG_SPACE); +} + +static void pnode_printpara(struct format *f, struct pnode *n) { struct pnode *np; @@ -1108,6 +1123,9 @@ pnode_print(struct format *f, struct pnode *n) break; case NODE_FUNCSYNOPSISINFO: macro_open(f, "Fd"); + break; + case NODE_IMAGEDATA: + pnode_printimagedata(f, n); break; case NODE_INFORMALEQUATION: macro_line(f, "Bd -ragged -offset indent");