Nicolas! Ta for the handy pointers here, but you forgot to take account of self-closing tags! Just putting your three tag-closing lines inside a wee regex conditional seems to sort it out, though. :-)
↧