#624 Fix selecting a piece of code in a PR and show it if there is one
Merged by pingou. Opened by pingou.
fix_hl_pr  into  master

Download 624.patch
no initial comment

I don't think this line works like you think it does. Lemme prepare an example.

If you wrote:

function do_the_thing(string) {
    console.log(string);
};
$(document).ready(function () { do_the_thing("one"); });
$(document).ready(do_the_thing("two"));
$(document).ready(function () { do_the_thing("three"); });

Then it would print out:

two
one
three

Because in the case of one and three, you're passing the function itself into $(document).ready(...), but in the case of two -- you're calling the function before the page is ready, and then passing the value of whatever it returns into $(document).ready(...).

Metadata