GithubHelp home page GithubHelp logo

Comments (4)

dimensi avatar dimensi commented on August 26, 2024 1

I'll see what I can do.
Also PR is welcome.

from html2pug.

dimensi avatar dimensi commented on August 26, 2024

@trasherdk. After research, I came to the conclusion that this feature would require too much effort. I'd have to rewrite the project from scratch. I don't have that much free time.

I will explain the reason why none of the items can be done without rewriting.

Initially I used the html2jade library, after I was asked to add "inline css". Since the library is no longer supported by anyone, I had to copy it to myself and fix the right places and the code is not really mine and adapt it to the new feature is too difficult, it is easier to rewrite from scratch.

And now for the features, all three points that you specified are impossible in the html specification. All existing html parsers follow the html specification.
For example: parse5, himalaya, hyntax.
According to html specification all html tags should be case insensitive and therefore parsers lead all tags to lower case.
There is also a strict set of tags that can be self-closing and all other self-closing tags are considered simply broken.
And finally { } this is not supported in any way by the html specification and everything inside them can be considered as new attributes by the parser.

To solve your problem, I will need to rewrite the code so that I can switch between parsers. In this situation between html and jsx. And it will take too much time which I don't have for this project.

If you want, you may fork my project or open pr with a solution.

You can close the issue yourself or I'll close it in a week.

from html2pug.

trasherdk avatar trasherdk commented on August 26, 2024

@dimensi budy. I'm kinda confused, why you have me referenced in this issue?
I'm a user of your module, and has no objections to your stewardship.
So far, it makes sense to me, and I do believe your knowledge in this matter supersedes mine substantially.
I believe, and trust, you will continue the path of the clean tool you have provided so far.
I feel, if those frameworks want to utilize your work, they should do the work. Like sugestions/PR's how to accomplish what they are looking for.

The dude that opened the issue was @FicoPrieto maybe you want to direct your comments to him ?

from html2pug.

dimensi avatar dimensi commented on August 26, 2024

Yeah, you're right. I accidentally pointed you out :) Sorry.

from html2pug.

Related Issues (14)

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.