Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/issue 216 bot utterance (Enable Parser to Handle Multiline Strings and Newlines) #544

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

Pouyanpi
Copy link
Collaborator

@Pouyanpi Pouyanpi commented Jun 5, 2024

Summary

This PR introduces enhancements to the get_numbered_lines function to correctly handle multiline strings and newline characters. It resolves #216.

  1. 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.

  2. 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.

  3. The util now differentiate between strings starting with " and """. This ensures that multiline strings enclosed in """ are not mistakenly treated as single line strings.

  4. Implement corresponding end to end test

@Pouyanpi Pouyanpi requested a review from drazvan June 5, 2024 19:33
@Pouyanpi Pouyanpi added this to the v0.10.0 milestone Jul 4, 2024
@Pouyanpi Pouyanpi self-assigned this Jul 4, 2024
@drazvan
Copy link
Collaborator

drazvan commented Jul 10, 2024

Looks good! 👍

@drazvan drazvan merged commit d83465e into develop Jul 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow new line characters inside predefined bot messages
2 participants