Fix the `diagrams` tool to avoid using empty URLs as tooltips and links