Skip to content

Commit

Permalink
doc: improve API doc on review feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Bezzubov <[email protected]>
  • Loading branch information
bzz committed Apr 16, 2019
1 parent 35f363d commit f1e8763
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 5 additions & 3 deletions internal/tokenizer/tokenize.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import (
"gopkg.in/src-d/enry.v1/regex"
)

// Tokenize returns lexical tokens from content. The tokens returned should match what
// the Linguist library returns (but they are not, until https://github.com/src-d/enry/issues/193).
// At most the first ByteLimit bytes of content are tokenized.
// Tokenize returns lexical tokens from content. The tokens returned match what
// the Linguist library returns. At most the first ByteLimit bytes of content are tokenized.
//
// BUG: Until https://github.com/src-d/enry/issues/193 is resolved, there are some
// differences between this function and the Linguist output.
func Tokenize(content []byte) []string {
if len(content) > ByteLimit {
content = content[:ByteLimit]
Expand Down
2 changes: 0 additions & 2 deletions internal/tokenizer/tokenize_c.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import "gopkg.in/src-d/enry.v1/internal/tokenizer/flex"

// Tokenize returns lexical tokens from content. The tokens returned match what
// the Linguist library returns. At most the first ByteLimit bytes of content are tokenized.
// Splitting at a byte offset means it might partition a last multibyte unicode character
// in the middle of a token (but it should not affect results).
func Tokenize(content []byte) []string {
if len(content) > byteLimit {
content = content[:byteLimit]
Expand Down

0 comments on commit f1e8763

Please sign in to comment.