aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2020-05-21 01:18:28 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2020-05-21 01:18:28 +0200
commit7cade98cf386d1909b3b1568c30bbe60765ac452 (patch)
treed4439412728dc4e410273bc974557c0e22c5b480
parenta7fa2599f636d10be7f5849bfba6d39982cd9d93 (diff)
downloadopenrussian-cli-7cade98cf386d1909b3b1568c30bbe60765ac452.tar.gz
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
-rwxr-xr-xopenrussian.lua4
1 files 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