Skip to content

Commit 649fba6

Browse files
committed
fix match issue
1 parent 247b712 commit 649fba6

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎language_tool_python/match.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _ordered_dict_repr():
7575
def __str__(self):
7676
ruleId = self.ruleId
7777
s = 'Offset {}, length {}, Rule ID: {}'.format(
78-
self.offset, self.length, ruleId)
78+
self.offset, self.errorLength, ruleId)
7979
if self.message:
8080
s += '\nMessage: {}'.format(self.message)
8181
if self.replacements:

‎setup.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name='language_tool_python',
10-
version='2.1.0',
10+
version='2.1.1',
1111
description='Checks grammar using LanguageTool.',
1212
long_description_content_type='text/markdown',
1313
long_description=long_description,
@@ -16,4 +16,4 @@
1616
url='https://github.com/jxmorris12/side-by-side',
1717
license='MIT',
1818
packages=find_packages()
19-
)
19+
)

‎tests/easy_test.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
tool = language_tool_python.LanguageTool('en-US')
33
text = u'A sentence with a error in the Hitchhiker’s Guide tot he Galaxy'
44
matches = tool.check(text)
5-
len(matches)
5+
print('Num. matches:', len(matches))
6+
print('First match:', matches[0])

0 commit comments

Comments
 (0)