fix(fun/wcl): Count words correctly if file starts with whitespace
This commit is contained in:
parent
1ba3d1cf97
commit
39b0176026
1 changed files with 3 additions and 2 deletions
|
@ -21,9 +21,10 @@
|
|||
(counting is-newline into newlines)
|
||||
|
||||
;; Count every "word", unless the preceding character already
|
||||
;; was a space.
|
||||
;; was a space or we are at the beginning of the file.
|
||||
(when (or (eq space previous-byte)
|
||||
(eq newline previous-byte))
|
||||
(eq newline previous-byte)
|
||||
(not previous-byte))
|
||||
(next-iteration))
|
||||
|
||||
(counting (or is-newline (eq space byte))
|
||||
|
|
Loading…
Reference in a new issue