When setting the 'enclose' to 'div', wrapping is applied. In some cases, the wrapping causes the text to render smaller (adding the line numbering resolves this). Regardless, if the text that needs to be wrapped does not contain a space, wrapping does not take place. Instead, the horizontal scrolls appear and the text is rendered outside the syntax highlighting box.
It appears that there aren't any symbols to naturally breakdown the text so that it may be wrapped. In my case, if ASCII symbols like the ampersand were used for wrapping, the issue would be resolved. However, for cases when the text only contains alphabets, perhaps it would still be good to wrap regardless.