P.S. Nitpick: You do not need to run fontification in while loops. Just fontifying next match before limit should be enough. Font-lock will call the function again if needed.I'm guessing for this to work I'd need to return the final char fortified? Or is the moving of point enough? Maybe related - I've noticed this doesn't seem to work with multiple src_ blocks per line, might you have any insight here?
-- Sébastien Miquel