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

line breaks implementation change #182

Conversation

khaled-iva-docs
Copy link
Contributor

Hi there!
I run this company iva-docs.com. The product is very straight forward, give us a template, we'll connect it to your data sources (Zapier, Typeform, Webhooks) and we'll deliver it where you want (Google drive, Email...).
I've looked at the current implementation of line breaks, and for some reason, it doesn't render properly in the Docx.
The output of this string:

const str = ` Love
Will
Always
Win`

is:

<w:r>
<w:t>
love <w:br/>will <w:br/> Always <w:br/> Win 
</w:t>
</w:r>

for some reason, it doesn't display properly.
So my suggestion (and what worked for me) is:

<w:r>
<w:t>
love
</w:t>
 <w:br/>
<w:t>
will
</w:t>
<w:br/>
<w:t>
Always
</w:t>
<w:br/>
<w:t>
Win
</w:t> 
</w:r>

I've then added this new implementation as an option in the CreateReportOptions. But I'm not sure if that's how you see it implemented.
I've setup this implementation in Iva and currently testing it in production. No Issues so far.
I'm available if you need anything

@khaled-iva-docs khaled-iva-docs changed the title line-break-implementation-change line breaks implementation change Dec 29, 2020
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 91.858% when pulling b7fcbc7 on iva-docs:line-break-implementation-change into cd9bb79 on guigrpa:master.

@dstapp
Copy link

dstapp commented Jan 20, 2023

@guigrpa Is there any chance this will be updated and merged? I can confirm that monkey-patching into a current release solves the problems mentioned e.g. in #143. Since this problem apparently appears since 2019 I'd consider it worth merging upstream, so that not everyone has to maintain a custom patch.

@jjhbw jjhbw changed the base branch from master to 143-newline-character-in-variable February 23, 2023 16:49
@jjhbw jjhbw force-pushed the 143-newline-character-in-variable branch from 86bc29c to 2de3e68 Compare February 23, 2023 16:52
@jjhbw
Copy link
Collaborator

jjhbw commented Feb 23, 2023

Thanks for this PR. I'll merge it in my work branch and do some more testing. This is pretty fundamental stuff, so I want to make sure it ends up being correct.

@jjhbw jjhbw merged commit ef021f7 into guigrpa:143-newline-character-in-variable Feb 23, 2023
jjhbw pushed a commit that referenced this pull request Feb 23, 2023
line breaks implementation change
Co-authored-by: Khaled Romdhane <heiyukidev@gmail.com>
jjhbw pushed a commit that referenced this pull request Feb 23, 2023
line breaks implementation change
Co-authored-by: Khaled Romdhane <heiyukidev@gmail.com>
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.

None yet

5 participants