File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed
mkdocs_embed_file_plugins/src Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 1
1
import re
2
2
3
+
3
4
def strip_comments (markdown ):
4
- file_content = markdown .split (' \n ' )
5
- markdown = ''
5
+ file_content = markdown .split (" \n " )
6
+ markdown = ""
6
7
for line in file_content :
7
- if not re .search (
8
- r'%%(.*)%%' , line ) or not line .startswith ('%%' ) or not line .endswith ('%%' ):
9
- markdown += line + '\n '
10
- markdown = re .sub (r'%%(.*)%%' , '' , markdown , flags = re .DOTALL )
8
+ if (
9
+ not re .search (r"%%(.*)%%" , line )
10
+ or not line .startswith ("%%" )
11
+ or not line .endswith ("%%" )
12
+ ):
13
+ markdown += line + "\n "
14
+ markdown = re .sub (r"%%(.*)%%" , "" , markdown , flags = re .DOTALL )
11
15
return markdown
12
16
17
+
13
18
def create_link (link ):
14
- if link .endswith ('/' ):
15
- return link [:- 1 ] + ' .md'
19
+ if link .endswith ("/" ):
20
+ return link [:- 1 ] + " .md"
16
21
else :
17
- return link + ' .md'
22
+ return link + " .md"
Original file line number Diff line number Diff line change 2
2
3
3
version = "2.0.4"
4
4
5
+
5
6
def classification_dependencies ():
6
7
with open ("requirements.txt" ) as f :
7
- external = []
8
- internal = []
8
+ external = []
9
+ internal = []
9
10
for package in f .read ().splitlines ():
10
11
if package .startswith ("git+" ):
11
- external .append (package .replace (' git+' , '' ))
12
+ external .append (package .replace (" git+" , "" ))
12
13
else :
13
14
internal .append (package )
14
15
return external , internal
You can’t perform that action at this time.
0 commit comments