mirror of
https://github.com/codespell-project/codespell.git
synced 2025-05-17 23:46:43 +08:00
Use similar colors when using stdin
This commit is contained in:
@ -78,8 +78,8 @@ def parse_file(filename, colors):
|
|||||||
for line in f:
|
for line in f:
|
||||||
for word in re.findall('\w+', line):
|
for word in re.findall('\w+', line):
|
||||||
if word in misspellings:
|
if word in misspellings:
|
||||||
cfilename = "%s%s" % (colors.FILE, filename)
|
cfilename = "%s%s%s" % (colors.FILE, filename, colors.DISABLE)
|
||||||
cline = "%d%s" % (i, colors.DISABLE)
|
cline = "%s%d%s" % (colors.FILE, i, colors.DISABLE)
|
||||||
cwrongword = "%s%s%s" % (colors.WWORD, word, colors.DISABLE)
|
cwrongword = "%s%s%s" % (colors.WWORD, word, colors.DISABLE)
|
||||||
crightword = "%s%s%s" % (colors.FWORD,
|
crightword = "%s%s%s" % (colors.FWORD,
|
||||||
misspellings[word].data,
|
misspellings[word].data,
|
||||||
|
Reference in New Issue
Block a user