Code Monkey home page Code Monkey logo

Comments (5)

Araq avatar Araq commented on June 29, 2024

Agreed.

from karax.

timotheecour avatar timotheecour commented on June 29, 2024

agreed; if you have a working PR that avoids creating a div with verbatim, then #160 can be closed

from karax.

jyapayne avatar jyapayne commented on June 29, 2024

#160 is incorrect anyways. Example:

let node = "This is an inner div <div>inner div</div>".verbatimRaw
# node == VNode("This is an inner div ")

It completely discards any other children. You probably shouldn't do this anyways (not the point of verbatim), but it also shouldn't result in discarded data.

The reason why verbatim currently uses a div is because of the above. To capture many children in one node. The way around this would be to make toDom return a list of nodes and all the places that call it be modified to handle a list of nodes. Then the surrounding div for verbatim could be removed.

from karax.

dom96 avatar dom96 commented on June 29, 2024

I recall that React has a special <>/</> syntax. Maybe we could similarly create a special "empty" node which allows a list of nodes to be returned without any additional tags being output?

from karax.

jyapayne avatar jyapayne commented on June 29, 2024

Hmm, that could work as well

from karax.

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.