Skip to content

Conversation

deanmalan
Copy link

Convert line breaks to \n when converting to raw text.

Since documents.Paragraph is converted text + "\n\n", I'm thinking it might make sense to convert breaks to \n?

if isinstance(element, documents.Paragraph):
return text + "\n\n"
if isinstance(element, documents.Break):
return text + "\n"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's possible for breaks to contain text? If not, I guess we can just return \n.

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.

1 participant