Giter VIP home page Giter VIP logo

Comments (4)

jimporter avatar jimporter commented on May 19, 2024 1

v0.5.2 is out on PyPI now with the quoting fix.

from mike.

jimporter avatar jimporter commented on May 19, 2024

Unfortunately, no, it's not really possible (well, not without a lot of work). I think it's possible to preserve the quotes, but the other bits would require a lot of hacks that probably wouldn't work in all cases.

What makes this so hard is that the parser (ruamel.yaml) takes the blank line at the end of your extra_css list and turns it into a "comment" node that sits after the last item in the list, rather than after the extra_css key. That makes it really hard on my end to tell when we have a situation like this. I'd need to handle cases like: 1) post-item comments that have contents other than a newline (i.e. real comments), 2) double-spacing of lines between each item, 3) how to apply spacing rules to other lists (e.g. if you have extra_css already but not extra_javascript).

This is partly a limitation of the parser I'm using (which does a better, but still imperfect, job of round-tripping YAML) and partly a result of YAML probably being too complex for its own good. Given that this is a command that people will generally only run once, it's tough to justify spending weeks improving the parsing so that it Just Works.

from mike.

pawamoy avatar pawamoy commented on May 19, 2024

Of course, I understand 🙂 Closing then, thank you for answering so quickly!

from mike.

jimporter avatar jimporter commented on May 19, 2024

Ok, I fixed the quoting issue in 2a5a12c. Now I just need to think about whether it's worth releasing a new version with only that fix, or if I should wait and see if there are any other new things to add to mike before publishing an update...

from mike.

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.