Commit 994b9547 authored by Nicolas Mansard's avatar Nicolas Mansard Committed by Nicolas Mansard
Browse files

[UTILS] Patch generate to avoid substring issue.

parent a83ed392
......@@ -34,7 +34,7 @@ def generate(tp_number: int):
content = [f'%do_not_load {dest}\n'] if hidden else [f'# %load {dest}\n', '\n'] + content
#content[-1] = content[-1].strip() # TODO
for cell_number, cell in enumerate(cells_copy):
if any(f'load {dest}' in cell_line for cell_line in cell['source']):
if any(cell_line.endswith(f'load {dest}') for cell_line in cell['source']):
data['cells'][cell_number]['source'] = content
content = []
hidden = False
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment