html: Pop up tooltip with table notes in output.
[pspp] / src / output / html.c
index b8679b57eca1ce7b41968dde01cf9b2404ecfe71..c1613c4fea24d5668322540f9e2087e2763b90b5 100644 (file)
@@ -505,7 +505,14 @@ html_output_table (struct html_driver *html, const struct table_item *item)
   bool tfoot = false;
   int y;
 
-  fputs ("<table>\n", html->file);
+  fputs ("<table", html->file);
+  if (item->notes)
+    {
+      fputs (" title=\"", html->file);
+      escape_string (html->file, item->notes, " ", "\n");
+      putc ('"', html->file);
+    }
+  fputs (">\n", html->file);
 
   const struct table_item_text *caption = table_item_get_caption (item);
   if (caption)