Giter Club home page Giter Club logo

Comments (9)

smhg avatar smhg commented on July 28, 2024

This is new behaviour since 5.0.0. But only when you set foldLength to 0, right?

from gettext-parser.

elitenas avatar elitenas commented on July 28, 2024

@smhg, I have not tried to mess with foldLength yet but this is a behavior since 4.2.0. I just upgraded to 5.0.0 and it's still the case. I will try foldLength and get back.

from gettext-parser.

elitenas avatar elitenas commented on July 28, 2024

Just tried const res = po.compile(out, {foldLength: 0}) and I get the same result

from gettext-parser.

smhg avatar smhg commented on July 28, 2024

@sinnstudio-nas I'm sorry, I mixed things up. This indeed has nothing to do with the recent changes (5.0.0).

Yes, line folding on newline characters seems to happen in any case.

Some thoughts:

  • I think it would indeed be great to be able to configure line folding, as many different opinions seem to exists. And likely other options are necessary (as there are other characters on which folding happens).
  • Maybe it is good to pull this into a separate library? With the foldLength option replaced by folding which will be passed on directly to the new library?

from gettext-parser.

elitenas avatar elitenas commented on July 28, 2024

@smhg so maybe a folding object that has properties like enabled and foldLength? That seems to be the better option here

from gettext-parser.

smhg avatar smhg commented on July 28, 2024

Yes, that's it I think. But putting a line-folding package on npm doesn't sound too bad I think?
It has little to do with gettext-conversion and others might use it. Also, it would separate the tests (as they neither have anything to do with gettext).
Do you feel like giving this a try?

from gettext-parser.

elitenas avatar elitenas commented on July 28, 2024

@smhg I would rather update the code here to account for all use cases for this project. Npm package may be a little heavy overtaking for me. Let me know your thoughts!

from gettext-parser.

smhg avatar smhg commented on July 28, 2024

That's ok if you can put the folding-related tests in a separate folder please.

from gettext-parser.

elitenas avatar elitenas commented on July 28, 2024

Solved with #67

from gettext-parser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.