From 7cade98cf386d1909b3b1568c30bbe60765ac452 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 21 May 2020 01:18:28 +0200 Subject: fixed display of accents when formatting the PARTNER section * the corresponding database columns (seldom) contain the accenting character (see e.g. sresat') * as noted in the comments, always accenting the partner is not trivial --- openrussian.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openrussian.lua b/openrussian.lua index 3a4f7e9..39677de 100755 --- a/openrussian.lua +++ b/openrussian.lua @@ -187,7 +187,7 @@ function format.noun(word_id, accented) -- but since the DB lists the partner as a string instead of -- word_id, finding the right entry could be unreliable. out_stream:write('.SH PARTNER\n', - row.partner, '\n') + map_accented(row.partner), '\n') end out_stream:write('.SH DECLENSION\n', @@ -276,7 +276,7 @@ function format.verb(word_id, accented) -- but since the DB lists the partner as a string instead of -- word_id, finding the right entry could be unreliable out_stream:write('.SH PARTNER\n', - lutf8.gsub(row.partner, "[;,] *", ", "), '\n') + lutf8.gsub(map_accented(row.partner), "[;,] *", ", "), '\n') end -- FIXME: Can we assume that verbs without specified aspect are always -- cgit v1.2.3