refactoring snippet DocLister and DocLister::render()