Nitpick: it's simpler and clearer to write `if category in ('problem', 'html'):`