-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Render author email addresses in markdown BIPs #1759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Perl, a while loop can be terminated by calling last
, so this ends the while loop that is reading the preamble.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.