X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Freport.git;a=blobdiff_plain;f=pret-lam.lua;h=5769a312d94af372d5f319e8300c4550a8cbe3a1;hp=c05f987bd71747b26b23c7a31b8775e4d8db1974;hb=c86ed93ead8fc3a01bc69e29b60981aad907bf99;hpb=b5c7b3b79746ee07210d1b5b93bd0ce83b8e6d29 diff --git a/pret-lam.lua b/pret-lam.lua index c05f987..5769a31 100644 --- a/pret-lam.lua +++ b/pret-lam.lua @@ -62,7 +62,9 @@ end -- Take a single word from str, if posible. Returns the rest of the string and -- the word taken. function buffers.visualizers.lam.take_word(str) - res, newstr = utf.match(str, "^(%a[%a%d_]+)(.*)") + -- A word must always start with a-z (in particular, λ is not a valid + -- start of a word). + res, newstr = utf.match(str, "^([a-zA-Z][%a%d_]+)(.*)") return res, newstr or str end