Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
86600d6c
Commit
86600d6c
authored
Nov 08, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
607c07f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
python/tools/garble/activity_garble.py
+4
-4
No files found.
python/tools/garble/activity_garble.py
View file @
86600d6c
...
...
@@ -28,14 +28,14 @@ class ActivityGarble:
for
(
src
,
dst
)
in
self
.
activity_mapping
.
items
():
#避免命名重复,确保要替换的部分前后没有合法的命名字符,如果有则还原
file_content
=
file_content
.
replace
(
src
,
dst
)
before
=
re
.
findall
(
r'[0-9a-zA-Z
_
]'
+
dst
,
file_content
)
if
before
!=
None
:
before
=
re
.
findall
(
r'[0-9a-zA-Z]'
+
dst
,
file_content
)
if
before
is
not
None
:
for
name
in
before
:
char
=
name
.
split
(
dst
)[
0
]
file_content
=
file_content
.
replace
(
name
,
char
+
src
)
after
=
re
.
findall
(
r''
+
"
%
s[0-9a-zA-Z
_
]"
%
dst
,
file_content
)
if
after
!=
None
:
after
=
re
.
findall
(
r''
+
"
%
s[0-9a-zA-Z]"
%
dst
,
file_content
)
if
after
is
not
None
:
for
name
in
after
:
char
=
name
.
split
(
dst
)[
1
]
file_content
=
file_content
.
replace
(
name
,
src
+
char
)
...
...
Write
Preview
Markdown
is supported
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