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
f3146c9e
"erp_web/git@ustchcs.com:gujinli1118/JSH_ERP.git" did not exist on "3df03ef910042fd392eb0e21b3bacf5baa15a5e3"
Unverified
Commit
f3146c9e
authored
Jan 15, 2022
by
Matheus Felipe
Browse files
Get content from index 0 if Index section does not exist
parent
ae7ac005
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/validate/links.py
View file @
f3146c9e
...
@@ -29,6 +29,8 @@ def find_links_in_file(filename: str) -> List[str]:
...
@@ -29,6 +29,8 @@ def find_links_in_file(filename: str) -> List[str]:
with
open
(
filename
,
mode
=
'r'
,
encoding
=
'utf-8'
)
as
file
:
with
open
(
filename
,
mode
=
'r'
,
encoding
=
'utf-8'
)
as
file
:
readme
=
file
.
read
()
readme
=
file
.
read
()
index_section
=
readme
.
find
(
'## Index'
)
index_section
=
readme
.
find
(
'## Index'
)
if
index_section
==
-
1
:
index_section
=
0
content
=
readme
[
index_section
:]
content
=
readme
[
index_section
:]
links
=
find_links_in_text
(
content
)
links
=
find_links_in_text
(
content
)
...
...
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