diff --git a/Tools/autotest/logger_metadata/emit_rst.py b/Tools/autotest/logger_metadata/emit_rst.py index 7e513a0cc8..dfaa8fea15 100644 --- a/Tools/autotest/logger_metadata/emit_rst.py +++ b/Tools/autotest/logger_metadata/emit_rst.py @@ -76,7 +76,8 @@ This is a list of log messages which may be present in logs produced and stored # Add the new row rows.append([f, ftypeunit, fdesc]) - print(self.tablify(rows), file=self.fh) + if rows: + print(self.tablify(rows), file=self.fh) print("", file=self.fh) self.stop() diff --git a/Tools/autotest/logger_metadata/enum_parse.py b/Tools/autotest/logger_metadata/enum_parse.py index 3826160de2..81aad8c432 100755 --- a/Tools/autotest/logger_metadata/enum_parse.py +++ b/Tools/autotest/logger_metadata/enum_parse.py @@ -35,7 +35,7 @@ class EnumDocco(object): # attempts to extract name, value and comment from line. # Match: " FRED, // optional comment" - m = re.match("\s*([A-Z0-9_a-z]+)\s*,? *(?:// *(.*) *)?$", line) + m = re.match("\s*([A-Z0-9_a-z]+)\s*,? *(?://[/>]* *(.*) *)?$", line) if m is not None: return (m.group(1), None, m.group(2)) @@ -45,7 +45,7 @@ class EnumDocco(object): return (m.group(1), None, m.group(2)) # Match: " FRED = 17, // optional comment" - m = re.match("\s*([A-Z0-9_a-z]+)\s*=\s*([-0-9]+)\s*,?(?:\s*//\s*(.*) *)?$", + m = re.match("\s*([A-Z0-9_a-z]+)\s*=\s*([-0-9]+)\s*,?(?:\s*//[/<]*\s*(.*) *)?$", line) if m is not None: return (m.group(1), m.group(2), m.group(3))