Minor fixes to manifest parser

This commit is contained in:
Ivan Kravets
2019-10-16 13:58:50 +03:00
parent 9da19fbf54
commit 9cfccc5cd4
3 changed files with 3 additions and 2 deletions

2
docs

Submodule docs updated: e755c715ff...3c565d175d

View File

@ -72,7 +72,7 @@ class ManifestModel(DataModel):
type=ListOfType(DataField(max_length=50, regex=r"^([a-z\d\-_]+|\*)$"))
)
frameworks = DataField(
type=ListOfType(DataField(max_length=50, regex=r"^([a-z\d\-_\*]+|\*)$"))
type=ListOfType(DataField(max_length=50, regex=r"^([a-z\d\-_]+|\*)$"))
)
repository = DataField(type=RepositoryModel)

View File

@ -240,6 +240,7 @@ class BaseManifestParser(object):
# normalize example names
for item in result:
item["name"] = item["name"].replace(os.path.sep, "/")
item["name"] = re.sub(r"[^a-z\d\d\-\_/]+", "_", item["name"], flags=re.I)
return result or None