remove trailing whitespace
fix #18 by allowing extra attributes in p tag in regex