Previously this code checked the generated documentation to decide if
something is a class or a module. Now, it parses the source file and
looks for the @classmod, @module and @submodule tags to make the same
decision.
Fixes: https://github.com/awesomeWM/awesome/issues/1255
Signed-off-by: Uli Schlachter <psychon@znc.in>
This function was iterating over a table with pairs() to generate output (the
sample theme file). Since pairs() does not guarantee any iteration order, this
lead to a different order each time this file was generated. This is, for
example, visible in the diffs in the generate api documentation repository.
Fix this by using a self-made iteration function which behaves like pairs(), but
guarantees an iteration order sorted by keys.
Signed-off-by: Uli Schlachter <psychon@znc.in>