Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
public-apis
Commits
c659e656
Unverified
Commit
c659e656
authored
Jan 15, 2022
by
Matheus Felipe
Browse files
Set constants
parent
1360d618
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/validate/format.py
View file @
c659e656
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
re
anchor
=
'###'
min_entries_per_section
=
3
auth_keys
=
[
'apiKey'
,
'OAuth'
,
'X-Mashape-Key'
,
'User-Agent'
,
'No'
]
punctuation
=
[
'.'
,
'?'
,
'!'
]
https_keys
=
[
'Yes'
,
'No'
]
cors_keys
=
[
'Yes'
,
'No'
,
'Unknown'
]
index_title
=
0
index_desc
=
1
index_auth
=
2
index_https
=
3
index_cors
=
4
index_link
=
5
num_segments
=
5
errors
=
[]
title_links
=
[]
anchor_re
=
re
.
compile
(
anchor
+
'\s(.+)'
)
section_title_re
=
re
.
compile
(
'\*\s\[(.*)\]'
)
link_re
=
re
.
compile
(
'\[(.+)\]\((http.*)\)'
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment