rework parsing inline markup within a block (<p> or <li>)