Fork me on GitHub
#babashka
<
2022-10-11
>
mkvlr15:10:17

https://cljdoc.org/d/hiccup/hiccup/2.0.0-alpha2/api/hiccup2.core#raw seems to be missing from hiccup2.core (babashka v0.9.162):

(ns-publics (find-ns 'hiccup2.core)) ;;=> {html #'hiccup2.core/html}
let me know if you'd like to have an issue for it

mkvlr15:10:10

I'd also find https://cljdoc.org/d/hiccup/hiccup/2.0.0-alpha2/api/hiccup.page convenient but I guess it's excluded for size constraints?

borkdude15:10:58

yes, yes and yes

borkdude15:10:12

issue welcome, I'll look into it before the next release

borkdude15:10:49

We can add those page helpers

borkdude10:10:44

@U5H74UNSF We do have hiccup.util/raw-string in bb already

borkdude10:10:51

the other one is just an alias for that

borkdude10:10:57

but I'll add it nonetheless

mkvlr10:10:07

still good to have it I think?

mkvlr10:10:24

not force folks to rewrite code

borkdude10:10:17

About page: it seems some of these macros expand into things that are deprecated

borkdude10:10:36

It expands into the unsafe html function

borkdude10:10:07

I'll make a compromise and support loading hiccup.page from the dependency

borkdude10:10:06

$ clojure -M:babashka/dev -Sdeps '{:deps {hiccup/hiccup {:mvn/version "RELEASE"}}}' -e "(require '[hiccup.page :as page]) (page/html5 [:a :dude])"
"\n<html><a>dude</a></html>"

mkvlr10:10:14

so when I specify it as a dep, I can use hiccup.page?

borkdude11:10:40

This is supported with bb from master now, commit 33bee0480db28a50d9b8da2d804e416748f09fc1 . Check #CSDUA8S6B for testing locally in a few minutes

mkvlr11:10:26

thank you!!

🎉 1
borkdude11:10:20

Correction: 7c15b04fa2851e7be402c617980f6a048766c7e9

borkdude11:10:44

should be there now. also you can install it using here: https://github.com/babashka/babashka-dev-builds

borkdude11:10:30

bash <(curl ) --version 0.10.164-SNAPSHOT --dir .

borkdude11:10:57

$ ./bb -Sdeps '{:deps {hiccup/hiccup {:mvn/version "RELEASE"}}}' -e "(require '[hiccup.page :as page]) (page/html5 [:a :dude])"
"\n<html><a>dude</a></html>"