Re: Creating Hiccup From Code Keeping Formatting and Comments

2015-01-05 Thread Stefan Kamphausen
Hi, Thanks for your pointers. That is something to dive into. Cheers, stefan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be

Re: Creating Hiccup From Code Keeping Formatting and Comments

2015-01-04 Thread Thomas Heller
Oops, simplified a little. We already have access to the title. ;) On Monday, January 5, 2015 1:09:24 AM UTC+1, Thomas Heller wrote: > > Here is a crazy idea I had. > > https://gist.github.com/thheller/ad7dc6234f205cf4a53f > > Basically it slurps the .clj file of the current namespace, then looks

Re: Creating Hiccup From Code Keeping Formatting and Comments

2015-01-04 Thread Thomas Heller
Here is a crazy idea I had. https://gist.github.com/thheller/ad7dc6234f205cf4a53f Basically it slurps the .clj file of the current namespace, then looks at the form metadata to skip to the line where the (example ...) starts. It then takes the next row as the title, then reads all rows until it

Re: Creating Hiccup From Code Keeping Formatting and Comments

2015-01-04 Thread Sam Ritchie
Hey Stefan, I wrote something much like this for the Om-Bootstrap doc site at om-bootstrap.herokuapp.com. I ended up putting all code examples into their own files, then slurping those up. The fun thing about the code below is that each example is executable, and actually runs on the om-boots

Re: Creating Hiccup From Code Keeping Formatting and Comments

2015-01-04 Thread James Reeves
Macros don't have access to formatting. You either need to put it in a string, or reformat the form afterwards. - James On 4 January 2015 at 15:57, Stefan Kamphausen wrote: > Hi, > > > Currently, I am trying to write a presentation using ring and reveal.js. > For the code samples, I'd like to w

Creating Hiccup From Code Keeping Formatting and Comments

2015-01-04 Thread Stefan Kamphausen
Hi, Currently, I am trying to write a presentation using ring and reveal.js. For the code samples, I'd like to write "real" clojure code, i.e. no strings or the like. Then, I want to turn that into a suitable hiccup vector which will create the correct reveal.js/highlight.js syntax. I w