You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ".../lib/python3.9/site-packages/pydbml/tools.py", line 44, in strip_empty_lines
while not lines[first_line] or lines[first_line].isspace():
IndexError: list index out of range
the reason is note: "" , the empty note was passed to strip_empty_lines function.
the related code in tools.py:
// the passed param source is ""
def strip_empty_lines(source: str) -> str:
"""Remove empty lines or lines with just spaces from beginning and end."""
first_line = 0
lines = source.split('\n')
last_line = len(lines) - 1
while not lines[first_line] or lines[first_line].isspace():
first_line += 1
while not lines[last_line] or lines[last_line].isspace():
last_line -= 1
return '\n'.join(lines[first_line: last_line + 1])
hope you can fix this issue, thx
The text was updated successfully, but these errors were encountered:
hi, i have tried pydbml and it has a bug here:
once you try to parse this snippet using pddbml,
the error occus:
the reason is
note: ""
, the empty note was passed to strip_empty_lines function.the related code in tools.py:
hope you can fix this issue, thx
The text was updated successfully, but these errors were encountered: