use more concise loop for inline kbd in haml backend