Skip to content

Offset error with Spelling and backtick before it #754

@blueyed

Description

@blueyed

Given foo.txt:

I `Dockerfile`

redpen -r json foo.txt produces:

[{"document":"foo.txt","errors":[{"sentence":"I Dockerfile","endPosition":{"offset":14,"lineNum":1},"validator":"Spelling","lineNum":1,"sentenceStartColumnNum":0,"message":"Found possibly misspelled word "Dockerfile".","startPosition":{"offset":2,"lineNum":1}}]}]

The offset with startPosition is 2 here, but should be 3.

It seems like the backtick caused the offset error here.

Also the offset for endPosition seems to be off.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions