Keep only fragment if link is anchor