<commit_before>describe 'LinkGrabber', ->
	
	describe 'with links', ->
		
		it 'should find all links', ->
			links = LinkGrabber.fromHTMLString('<p>Lorem <a href="http://foo/">ipsum</a> dolor <a href="http://bar/">lorem</a> ipsum</p>').allLinks()
			links.should.have.lengthOf(2)
			links[0].should.equal("http://foo/")
			links[1].should.equal("http://bar/")<commit_msg>Add test for ignoring name anchors<commit_after>describe 'LinkGrabber', ->
	
	describe 'with html input', ->
		
		it 'should find all links', ->
			links = LinkGrabber.fromHTMLString('<p>Lorem <a href="http://foo/">ipsum</a> dolor <a href="http://bar/">lorem</a> ipsum</p>').allLinks()
			links.should.have.lengthOf(2)
			links[0].should.equal("http://foo/")
			links[1].should.equal("http://bar/")
		
		it 'should ignore anchor name tags', ->
			links = LinkGrabber.fromHTMLString('<a name="top">foo</a>').allLinks()
			links.should.have.lengthOf(0)
{'fraction_non_alphanumeric': 0.21366594360086769, 'fraction_numerical': 0.007592190889370932, 'mean_word_length': 4.156424581005586, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6626027', 'n_tokens_mistral': 364, 'n_tokens_neox': 318, 'n_words': 57}