Skip to content

Change the header parse function not to exclude ending -n character in string #7

@sanderhouttekier

Description

@sanderhouttekier

in po.js on line 84 you parse the value of a header.

you do this via:

value = p.join(':').trim().replace(/n$/);

I wonder why you replace the final character if it is n without even supplying no replace character.

my: "Language: en\n" therefor ends up being Language: eundefined

what is the reason for replacing the final character if it is n, with nothing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions