plexus / html-to-hiccup Goto Github PK
View Code? Open in Web Editor NEWEmacs package that turns HTML into Hiccup syntax
License: Mozilla Public License 2.0
Emacs package that turns HTML into Hiccup syntax
License: Mozilla Public License 2.0
Hi,
it appears that h-t-h could generate clojure symbols in the tag shorthand notation that are unparsable by clojure, e.g. from an example trying to convert tailwindcss classes to hiccup:
<h1 class="max-w-sm w-full sm:w-1/2 lg:w-1/3 py-6 px-3">Yes</h1>
will generate
[:html [:body [:h1.max-w-sm.w-full.sm:w-1/2.lg:w-1/3.py-6.px-3 "Yes"]]]
with :h1.max-w-sm.w-full.sm:w-1/2.lg:w-1/3.py-6.px-3
being a symbol unparsable by clojure due to its double `/'.
on a REPL:
user> :h1.max-w-sm.w-full.sm:w-1/2.lg:w-1/3.py-6.px-3
Syntax error reading source at (REPL:44:1).
Invalid token: :h1.max-w-sm.w-full.sm:w-1/2.lg:w-1/3.py-6.px-3
Thus the resulting hiccup cannot be parsed by clojure.
Patch to follow.
Hi,
I tried your instructions on getting the package. I always try to use use-package, as it greatly simplifies things.
I noticed that the package is not included in elpa nor is it in melpa.
What should happen: a pull request should be made to melpa to include a recipe for this package. If I have some time I might create one for the melpa archive.
Regards,
Arjen
Is there a way to get rid of the html and body tags ?
<b>test</b>
becomes
[:html [:body [:b "test"]]]
I had a look at the code but i don't understand where those tags are being inserted in the code so obviously something happening i don't understand.
A param to the function perhaps would be nice to choose if you want the extra tags.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.