aboutsummaryrefslogtreecommitdiff
path: root/proposals/reindex.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-04-23 10:43:48 -0400
committerNick Mathewson <nickm@torproject.org>2020-04-23 10:43:48 -0400
commit3ada0e7ed37c293b9cf13ade46558d31679e2a05 (patch)
tree6248b0f177753015809add6b148b60cd3d31cd13 /proposals/reindex.py
parent47b495f5f0f4c936cb89055d646885e640be4c47 (diff)
downloadtorspec-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-xproposals/reindex.py8
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)