Text this: Understanding edge-localized mode mitigation by resonant magnetic perturbations on MAST.