Git Product home page Git Product logo

Comments (2)

jeremydavis519 avatar jeremydavis519 commented on June 29, 2024

I'd like to take this one if you don't mind. I should have a working version soon. But just to be clear, when you refer to a "WS item," that means a line that contains nothing but whitespace, right? Nothing else seems to make sense, given the source code that I've read since discovering this project a few hours ago. (In particular, I thought at first that any whitespace surrounding a newline would count, but that's clearly not right.)

from molten.

LeopoldArkham avatar LeopoldArkham commented on June 29, 2024

Hey, great to have you!

Yes. I do specifically mean Item::WS elements should be concatenated into a single one if multiple of them occur consecutively.

Couple things I didn't mention in the OP:

  • Ideally this would stay allocation-free. Meaning you can keep track of the start index of the last WS element and create a new slice if another WS element follow it. You could also go unsafe and use `slice::from_raw_parts if you feel like it.
  • Ideally this would happen as the items are parsed, not as a second pass
  • There should be a test for it, but it doesn't need to be in the first draft of the PR.

Let me know if you need anything!

from molten.

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.