projects
/
matthijs
/
master-project
/
report.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only allow a word to start with a-z in pret-lam.
[matthijs/master-project/report.git]
/
pret-lam.lua
diff --git
a/pret-lam.lua
b/pret-lam.lua
index c05f987bd71747b26b23c7a31b8775e4d8db1974..cf50e87408e1d880d98b2c506a4207879431b2ad 100644
(file)
--- 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)
-- 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-z][%a%d_]+)(.*)")
return res, newstr or str
end
return res, newstr or str
end