Skip to content

Commit

Permalink
Merge pull request #459 from KnowledgeCaptureAndDiscovery/dev Fix #457
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dgarijo authored May 11, 2022
2 parents 6f7baa1 + fc1db19 commit 6dcd89d
Show file tree
Hide file tree
Showing 5 changed files with 616 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/somef/regular_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def remove_links_images(text):
links = re.findall(r"\[(.*?)?\]\(([^)]+)\)", text)
for link in links:
link_text = link[1]
pos = text.find(link_text)
pos = text.find("("+link_text+")")
if pos != -1:
init = text[:pos].rindex("[")
end = text[pos:].index(")")
Expand Down
24 changes: 23 additions & 1 deletion src/somef/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,4 +950,26 @@ def test_issue_443_3(self):
json_content = json.loads(data)
description = json_content['description']
assert description is not None
os.remove(test_data_path + "test-443.json")
os.remove(test_data_path + "test-443.json")

def test_issue_457(self):
cli.run_cli(threshold=0.8,
ignore_classifiers=False,
repo_url=None,
local_repo=None,
doc_src=test_data_path + "README-pytorch.md",
in_file=None,
output=test_data_path + "test-457.json",
graph_out=None,
graph_format="turtle",
codemeta_out=None,
pretty=True,
missing=True,
readme_only=False)
text_file = open(test_data_path + "test-457.json", "r")
data = text_file.read()
text_file.close()
json_content = json.loads(data)
description = json_content['description']
assert description is not None
os.remove(test_data_path + "test-457.json")
Loading

0 comments on commit 6dcd89d

Please sign in to comment.