From 6b4b09adc564b536c2eeee4bb944d780ddf7d240 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Tue, 1 Oct 2019 01:58:05 -0400 Subject: [PATCH] doc: Fix the UML template svg generation. It was mixing the actual HTML relative path with the build directory path. This doesn't work universally. It didn't work on `awesome-www` builder. --- tests/examples/uml/template.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/examples/uml/template.lua b/tests/examples/uml/template.lua index 1b24ede41..399c50b4c 100644 --- a/tests/examples/uml/template.lua +++ b/tests/examples/uml/template.lua @@ -6,7 +6,7 @@ local wibox = require("wibox") local beautiful = require("beautiful") -- Make the path relative. -image_path = "../" .. image_path:match("/(images/[^/]+)$") +local relative_image_path = "../" .. image_path:match("/(images/[^/]+)$") -- This template generates an HTML table with how other classes are associated -- with a given class. @@ -204,9 +204,10 @@ function module.generate_nav_table(t) assert(entry.class) assert(entry.left.msg and entry.left.card) assert(entry.right.msg and entry.right.card) - local path = image_path..counter..".svg" + local path = relative_image_path..counter..".svg" + local fpath = image_path..counter..".svg" local widget = gen_table_uml(entry, t.class, entry.class, false) - wibox.widget.draw_to_svg_file(widget, path, 320, 50) + wibox.widget.draw_to_svg_file(widget, fpath, 320, 50) get_table_row(path, entry.class, entry[tab.."_property"]) counter = counter + 1 end