refactoring slightly to allow more stuff to be passed to replaceRenderer method
added support for em and strong elements