In the loving memory of Jack Bauer. Wherever you are now, if you need help hiding, you can count on us !
What is it ?
When you're displaying content from a database, after some time, you might end up with some contents in HTML, other in markdown and maybe even worst ... Jack takes your content and only the format it should be in and returns you the proper output.
The formats supported are based on my own needs. So for now, it's only HTML and Markdown. Feel free to fork the project and add new formats. I'd be glad to merge it.
require 'jack' @content = Jack.render "my page content in HTML", "html" @content = Jack.render "my page content in Markdown", "markdown"
That's all !
In HTML :
[code lang="ruby"]This is ruby code[/code] [code language="html"]This is HTML code[/code]
In Markdown :
I'm still trying to figure out the best way to specify the language with the markdown code syntax. The idea would be something like this format :
"ruby" This is ruby code
Once you've made your great commits:
- Fork Jack
- Create a topic branch -
git checkout -b my_branch
- Push to your branch -
git push origin my_branch
- Create an Issue with a link to your branch
- That's it!
Damien MATHIEU :: firstname.lastname@example.org :: @dmathieu