render_content() bug fix: handles newlines after tags so indices don't get messed up