Git Product home page Git Product logo

Comments (5)

sapegin avatar sapegin commented on June 11, 2024

No, but I guess we can infer the original style, the same way we infer indentation in JSON.

from mrm-core.

noxan avatar noxan commented on June 11, 2024

What do you think of how the logic for this detection work. Match the first line and see if it is separated by ·=· or by =? Fallback to default if detection fails?
(Highlighted space with ·, otherwise you don't see a difference)
Furthermore this way there would be no way of creating new files with the = version.

Let me know what suits you best, I need the last mentioned one for a specific use case and would rather contribute upstream instead of creating individual solutions. But no hard feelings if it does not match.

from mrm-core.

sapegin avatar sapegin commented on June 11, 2024

You’re right about new files :-/

Then I guess the best we can do is an option. Default value would be inferred from an original file if we have one, or adding whitespace if we’re creating a new file.

Match the first line and see if it is separated by ·=· or by =? Fallback to default if detection fails?

Yep, the first line which is not a comment.

from mrm-core.

TrySound avatar TrySound commented on June 11, 2024

I tried to use for flow config which do not accepts spaces around =. By default it's empty, nothing to infer.

from mrm-core.

sapegin avatar sapegin commented on June 11, 2024

@TrySound That’s why

Then I guess the best we can do is an option

from mrm-core.

Related Issues (17)

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.