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

Folding line when EOL is on 75th character boundary #166

Closed
1007tejas opened this issue Jan 10, 2020 · 0 comments
Closed

Folding line when EOL is on 75th character boundary #166

1007tejas opened this issue Jan 10, 2020 · 0 comments

Comments

@1007tejas
Copy link

Server: Debian 9
Install: Composer package jeroendesloovere / vcard
Framework: Laravel 5.8
Issue: vcard.php function: fold

Folding lines when the end of line character(s) is crosses the 75th character boundary.
In this example the second label creates a blank fold.
------------------------ Original code creates a fold

LABEL:333 LANCASTER AVE APT 3\nFORT WORTH\nTX\n12345\nUSA
LABEL:123 LONGFORD DR UNIT 12\nDALLAS\nTX\n54321\nUNITED STATES OF AMERICA


 
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRo

Adding a test that trims the text before checking string length passes, returning the example Label
with original eol intact and no fold.

------------------------ After trim test no fold

LABEL:333 LANCASTER AVE APT 3\nFORT WORTH\nTX\n12345\nUSA
LABEL:123 LONGFORD DR UNIT 12\nDALLAS\nTX\n54321\nUNITED STATES OF AMERICA
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRo

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

No branches or pull requests

1 participant