Render author email addresses in markdown BIPs#1759
Conversation
|
Alas, the formatting checker doesn’t accept this change. |
|
I'd suggest ajtowns@726df6f |
|
ajtowns@726df6f dunno if it is more Markdown-idiomatic, but is more elegant for reading the raw document source. |
|
From the Daring Fireball Introducing Markdown post
(emphasis in "readable" is mine) |
d06a328 to
726df6f
Compare
|
@ajtowns: Thanks, that looks great. I’ve used your commit instead of mine. |
murchandamus
left a comment
There was a problem hiding this comment.
LGTM. I think it’s RFM. @jonatack?
| while (<$F> !~ m[^(?:\xef\xbb\xbf)?```$]) { | ||
| die "No ``` in $fn" if eof $F; | ||
| } | ||
| } else { | ||
| while (<$F> !~ m[^(?:\xef\xbb\xbf)?<pre>$]) { |
There was a problem hiding this comment.
This appears to be Perl for reading a file line by line, and requiring that the initial lines of the file either only contain the byte order mark, or ``` if it is a Markdown file or <pre> if it is a Mediawiki file.
There was a problem hiding this comment.
It reads the next (first) line of the file, checks if the full line doesn't exactly match <pre> possibly preceded by the byte order marker, and aborts if it doesn't. Not sure why it's written as a while loop; it's not like it can actually enter the loop body twice.
| last if ($is_markdown && m[^```$]); | ||
| last if (!$is_markdown && m[^</pre>$]); |
There was a problem hiding this comment.
In Perl, a while loop can be terminated by calling last, so this ends the while loop that is reading the preamble.
@ajtowns pointed out in his BIP 3 review that the author email addresses in the preamble of BIPs in markdown format were not being rendered.