Bug 1302192: require headings to begin a line; r=hammad13060+583205
MozReview-Commit-ID: 4me4VI8Si0h
--- a/taskcluster/taskgraph/util/verify.py
+++ b/taskcluster/taskgraph/util/verify.py
@@ -19,17 +19,17 @@ def verify_docs(filename, identifiers, a
if appearing_as == "inline-literal":
expression_list = [
"``" + identifier + "``"
for identifier in identifiers
if not identifier.startswith("_")
]
elif appearing_as == "heading":
expression_list = [
- identifier + "\n(?:(?:(?:-+\n)+)|(?:(?:.+\n)+))"
+ '\n' + identifier + "\n(?:(?:(?:-+\n)+)|(?:(?:.+\n)+))"
for identifier in identifiers
if not identifier.startswith("_")
]
else:
raise Exception("appearing_as = `{}` not defined".format(appearing_as))
for expression, identifier in zip(expression_list, identifiers):
match_group = re.search(expression, doctext)