diff options
author | Philip Withnall <withnall@endlessm.com> | 2019-03-07 17:33:51 +0000 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2019-03-07 17:33:51 +0000 |
commit | bee5d16b68e25befe4b0b7f3bfadaac699ced347 (patch) | |
tree | a8d9f804fe27f66d12f7be002476f6fdc0ded445 | |
parent | c91ba300cdecd8023b1646e871c5d28469746408 (diff) | |
download | gtk-doc-bee5d16b68e25befe4b0b7f3bfadaac699ced347.tar.gz |
fixxref: Add support for ‘-es’ plurals in the poor man’s plural support
We currently try to link symbols which end in ‘-s’ as a way of handling
plurals. Extend that to plurals which end in ‘-es’, which can happen in
English if the singular ends in an ‘s’. For example, ‘GNetworkAddress’ →
‘GNetworkAddresses’.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
-rwxr-xr-x | gtkdoc/fixxref.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gtkdoc/fixxref.py b/gtkdoc/fixxref.py index 0a7bd6b..9b6d3a5 100755 --- a/gtkdoc/fixxref.py +++ b/gtkdoc/fixxref.py @@ -289,7 +289,16 @@ def GetXRef(id): return (tid, href) # poor mans plural support - if id.endswith('s'): + if id.endswith('es'): + tid = id[:-2] + href = Links.get(tid) + if href: + return (tid, href) + tid += '-struct' + href = Links.get(tid) + if href: + return (tid, href) + elif id.endswith('s'): tid = id[:-1] href = Links.get(tid) if href: |