Handle message types in formatter

Most messages will work with or without the Message tail, e.g. SetDateMessage
vs. SetDate. The exception to this is SetMessageMessage, which must be specified
fully.
This commit is contained in:
str4d
2015-06-27 15:32:51 +00:00
parent 3a527f5535
commit 927217c5c2

View File

@@ -716,6 +716,10 @@ class I2PHtmlFormatter(Formatter):
if tagsfile and ttype in Token.Name.Class:
filename, kind = self._lookup_ctag(value)
# Handle message types
if not kind and value.endswith('Message'):
value = value[:-7]
filename, kind = self._lookup_ctag(value)
if kind:
base, filename = os.path.split(filename)
if base: