Skip to content

Commit

Permalink
Allow an introduction in issues lists (#2117)
Browse files Browse the repository at this point in the history
  • Loading branch information
frivoal authored Sep 30, 2021
1 parent 2995d95 commit c2f0309
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion bikeshed/issuelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def extractHeaderInfo(lines, infilename):
ed = None
date = None
cdate = None
intro = None
for line in lines:
match = re.match(r"(Draft|Title|Status|Date|ED):\s*(.*)", line)
if match:
Expand Down Expand Up @@ -150,13 +151,18 @@ def extractHeaderInfo(lines, infilename):
die("Missing 'ED' metadata.")
return

match = re.search(r"^Intro:\s*(.*(\n^$|\n[ \t]+.*)*)", "".join(lines), re.M)
if match:
intro = match.group(1)

return {
"title": title,
"date": date,
"cdate": cdate,
"ed": ed,
"status": status,
"url": url,
"intro": intro,
}


Expand All @@ -167,7 +173,14 @@ def printHelpMessage():
Date: YYYY-MM-DD (Optional if can be autodetected from the Draft's URL)
Status: CR/FPWD/LCWD/LS/Version/… (Optional if can be autodetected from the Draft's URL)
ED: https://url.to.the.editor.s/draft/ (Optional, defaults to a csswg editor's draft if shortname can be infered from the Draft's URL)
Intro: <p>Optional markup to be injected into the output document.
the intro can continue on multiple lines
as long as they're indented.
<p>Blank lines in the middle are fine.
... anything else you want here, except 4 dashes ...
... this will not be included in the output ...
----
Issue 1.
Expand Down Expand Up @@ -202,7 +215,9 @@ def printHeader(outfile, headerInfo):
<p>Review document: <a href="{url}">{url}</a>
<p>Editor's draft: <a href="{ed}">{ed}</a>
<p>Editor's draft: <a href="{ed}">{ed}</a></p>
{intro}
<p>The following color coding convention is used for comments:</p>
Expand Down

0 comments on commit c2f0309

Please sign in to comment.