Fix spanAffectsWrapping regexp for Safari

Issue #1825