better markup parsing
fixes #2