diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-04-23 10:43:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-04-23 10:43:48 -0400 |
commit | 3ada0e7ed37c293b9cf13ade46558d31679e2a05 (patch) | |
tree | 6248b0f177753015809add6b148b60cd3d31cd13 /proposals/reindex.py | |
parent | 47b495f5f0f4c936cb89055d646885e640be4c47 (diff) | |
download | torspec-3ada0e7ed37c293b9cf13ade46558d31679e2a05.tar.gz torspec-3ada0e7ed37c293b9cf13ade46558d31679e2a05.zip |
Add proposal 314 (markdown) and 315 (required fields.)
Also tweak reindex.py under the assumption that we will be accepting
proposal 314.
Diffstat (limited to 'proposals/reindex.py')
-rwxr-xr-x | proposals/reindex.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/proposals/reindex.py b/proposals/reindex.py index 1f52466..361ea16 100755 --- a/proposals/reindex.py +++ b/proposals/reindex.py @@ -37,10 +37,12 @@ def readProposal(fn): return fields if line[0].isspace(): fields[lastField] += " %s"%(line.strip()) + elif line == "```": + pass else: parts = line.split(":", 1) if len(parts) != 2: - raise Error("%s:%s: Neither field nor continuation"% + raise Error("%s:%s: Neither field, continuation, nor ```."% (fn,lineno)) else: fields[parts[0]] = parts[1].strip() @@ -93,8 +95,8 @@ def readProposals(): for fn in os.listdir(DIR): m = FNAME_RE.match(fn) if not m: continue - if not fn.endswith(".txt"): - raise Error("%s doesn't end with .txt"%fn) + if not (fn.endswith(".txt") or fn.endswith(".md")): + raise Error("%s doesn't end with .txt or .md"%fn) num = m.group(1) fields = readProposal(fn) checkProposal(fn, fields) |