This PR introduces enhancements to the get_numbered_lines function to correctly handle multiline strings and newline characters. It resolves #216.
Multiline strings are now correctly appended to the lines list when they end. This ensures that all lines, including multiline strings, are returned in the final output.
The indentation for multiline strings is now calculated based on the first line of the multiline string. This ensures that the indentation is consistent with other lines.
The util now differentiate between strings starting with " and """. This ensures that multiline strings enclosed in """ are not mistakenly treated as single line strings.
Summary
This PR introduces enhancements to the
get_numbered_lines
function to correctly handle multiline strings and newline characters. It resolves #216.Multiline strings are now correctly appended to the
lines
list when they end. This ensures that all lines, including multiline strings, are returned in the final output.The indentation for multiline strings is now calculated based on the first line of the multiline string. This ensures that the indentation is consistent with other lines.
The util now differentiate between strings starting with
"
and"""
. This ensures that multiline strings enclosed in"""
are not mistakenly treated as single line strings.Implement corresponding end to end test