about summary refs log tree commit homepage
path: root/examples/cgit-commit-filter.lua
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-03-19 04:18:54 +0000
committerEric Wong <e@80x24.org>2021-03-19 06:08:24 +0000
commit1f3484ab159750f09aea244727974599f049424e (patch)
treeb01c358d2bfeead7a3ec7a1b42292cbdc666dcb7 /examples/cgit-commit-filter.lua
parent6890430df808488a42184844bb74331644772b09 (diff)
downloadpublic-inbox-1f3484ab159750f09aea244727974599f049424e.tar.gz
examples: cgit-commit-filter: drop <tt> HTML tag, use title=
<tt> doesn't seem necessary and it's deprecated in HTML, nowadays.
In any case, dillo's CSS support seems to show it as fixed-width
even without <tt>.  Use the title= attribute to highlight that
it goes to the mail thread, too.

In the future, we'll probably link to something like "lei p2q"
(patch-to-query) to include OIDs in the search.
Diffstat (limited to 'examples/cgit-commit-filter.lua')
-rw-r--r--examples/cgit-commit-filter.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/cgit-commit-filter.lua b/examples/cgit-commit-filter.lua
index 9614c944..9857b3c9 100644
--- a/examples/cgit-commit-filter.lua
+++ b/examples/cgit-commit-filter.lua
@@ -31,12 +31,13 @@ function filter_close()
                 if u == nil then
                         html(buffer)
                 else
-                        html('<a href="' .. u .. '?x=t&amp;q=')
+                        html("<a\ntitle='mail thread'\n")
+                        html('href="' .. u .. '?x=t&amp;q=')
                         s = string.gsub(buffer, '"', '""')
                         html_url_arg('"' .. s .. '"')
-                        html('"><tt>')
+                        html('">')
                         html_txt(buffer)
-                        html('</tt></a>')
+                        html('</a>')
                 end
         else
                 -- pass the body-through as-is