Question: I am trying to make a chrome extension that finds certain words on pages and turns them into hyperlinks. So for example, if I visit a website that has the word "search" written somewhere, then that word will turn into a link that I can click on (it will still appear as the word but maybe in a different colour or something) and be redirected to "www.google.com".

I have a code that finds words and changes them to other words but I don't know how to change them to hyperlinks. Here is the JavaScript I have:

```
walk(document.body);    
function walk(node)  
{       
    var child, next;    
    switch ( node.nodeType )  
    {
        case 1: 
        case 9:  
        case 11: 
            child = node.firstChild;
            while ( child ) 
            {
                next = child.nextSibling; 
                walk(child);
                child = next;
            }
            break;    
        case 3: 
            handleText(node);
            break;
    }
}

function handleText(textNode) 
{
    var v = textNode.nodeValue;    
    v = v.replace(/\bsearch\b/g, (str.link("https://www.google.com")));
    v = v.replace(/\bsearch\b/g, <a href="http://www.google.com">asdf</a>);

    textNode.nodeValue = v;
}

```

Can somebody helpful help me out please?

Answer: 
Read about the [allocator requirements](https://en.cppreference.com/w/cpp/named_req/Allocator). `operator==` tells you whether one of the allocator object instances can free memory that was allocated by the other. That's important when you move the contents of one container into another. If the second container's allocator is `==` to the first container's, you can, in general, do the move by swapping a pointer or two, reusing the first container's memory in the second. If the allocators are not equal, then the copy operation has to copy each element, allocating memory in the second container as needed, and free the memory held by the first container.
Docs also says

> 
> a1 == a2 returns true only if the storage allocated by the allocator
>  a1 can be deallocated through a2. Establishes reflexive, symmetric,
>  and transitive relationship. Does not throw exceptions.
> 
> 
>