1
mirror of https://github.com/public-apis/public-apis synced 2024-11-21 10:04:15 +01:00

Create a error message generator

This commit is contained in:
Matheus Felipe 2022-01-16 01:08:49 -03:00
parent c659e65677
commit 2501df6b93
No known key found for this signature in database
GPG Key ID: AA785C523274872F

View File

@ -23,3 +23,8 @@ title_links = []
anchor_re = re.compile(anchor + '\s(.+)') anchor_re = re.compile(anchor + '\s(.+)')
section_title_re = re.compile('\*\s\[(.*)\]') section_title_re = re.compile('\*\s\[(.*)\]')
link_re = re.compile('\[(.+)\]\((http.*)\)') link_re = re.compile('\[(.+)\]\((http.*)\)')
def error_message(line_number: int, message: str) -> str:
line = line_number + 1
return f'(L{line:03d}) {message}'