question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

disabling line folding causes headers to break

See original GitHub issue

If the gettextParser.po.compile method is run with { foldLength : 0 }, the headers will be written out in a single line, for example:

msgid ""
msgstr "Language: de_DE\nContent-Type: text/plain; charset=utf-8\nPlural-Forms: nplurals=2; plural=(n != 1);\n"

The reason is that in pocompiler.js:224, the header block is prepared to be inserted as a normal msgid/msgstr, but if line wrapping is disabled, then it won’t become split up in line 159.

A workaround is to set { foldLength: Number.MAX_SAFE_INTEGER }, but ideally headers shouldn’t be broken when line wrapping is disabled.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
smhgcommented, Feb 11, 2021

Thank you for the effort. It doesn’t look like a simple change, indeed. I’ll leave this issue open for now, should anyone want to give it a try.

0reactions
KapitanOczywistycommented, Feb 11, 2022

Original --no-wrap causes line breaks only on new line, thus breaks at new line should be always present.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bad References header in outgoing mail - TechNet - Microsoft
Basically a new, folded header line is being started, but it is not being populated by additional message reference lines.
Read more >
Long header folding adds additional spaces #1525 - GitHub
Headers are folded by adding line breaks and white space at the start of continuation lines, so this is doing: Split text into...
Read more >
2011-04-11 Rewriting Header Folding: Less Code = Fewer Bugs
This was accomplished by inserting CRLF characters and having the next line of the header start with white space. Thus a new header...
Read more >
Is it possible to disable floating headers in UITableView with ...
1. Implemented 'willSelectRowAtIndexPath' so that the control never reaches 'didSelectRowAtIndexPath' on selecting the Section Header row.
Read more >
Gratuitous CRLF in Subject: line - why is it there, and is it legal?
The process of moving from this folded multiple-line representation of a header field to its single line representation is called "unfolding". Unfolding is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found