152 moduledocstrings = {}
153 for classname, data
in sorted(
LEXERS.items(), key=
lambda x: x[0]):
155 mod =
__import__(module,
None,
None, [classname])
159 print(
"Warning: %s does not have a docstring." % classname)
160 docstring = cls.__doc__
165 ', '.join(data[2])
or 'None',
166 ', '.join(data[3]).replace(
'*',
'\\*').replace(
'_',
'\\')
or 'None',
167 ', '.join(data[4])
or 'None',
169 if module
not in moduledocstrings:
173 moduledocstrings[module] = moddoc
175 for module, lexers
in sorted(
modules.items(), key=
lambda x: x[0]):
176 if moduledocstrings[module]
is None:
177 raise Exception(
"Missing docstring for %s" % (module,))
178 heading = moduledocstrings[module].
splitlines()[4].strip().rstrip(
'.')