MDL-41672: Identical HTML links not enumerated correctly in forum post copies sent to email 



The unit test is (after the line 80 in https://github.com/moodle/moodle/blob/master/lib/tests/html2text_test.php).

$this->assertEquals("There are links on google [1], google [1] and univ-lemans [2]\n\nLinks:\n------\n[1] http://www.google.fr\n[2] http://www.univ-lemans.fr\n",
html_to_text('<p>There are links on <a href="http://www.google.fr">google</a>, <a href="http://www.google.fr">google</a> and <a href="http://www.univ-lemans.fr">univ-lemans</a>',75,true));