Backported from commit 87e7231fa4 (2022-12) in the template-live-editor fork.
4XBR6CLDPPWR5WP7GHSFPTQZ66ZOIV54GXC3M4ZCSN4FDU4FQTUQC
TNRO6KLZXIZUFWKCXSWAJHN2CMHS56ATGGULOKMJC2YNCFRJZKLAC
local cmd = buf:match('^%S+')
local cmd = buf:match('^%s*(%S+)')