Re:Show HN: HTMLify - Turn code snippets into HTML, for tech...
by arb99 on Saturday May 18, 2013 @07:47AM
(#5728591)
Was expecting full html markup with colours etc like in most IDEs. maybe add that as a optional feature? http://qbnz.com/highlighter/ or similar library might help there.
This seems like a slightly extended htmlentities(nl2br($input)) (if done in php). handy in those times you need stuff converted so it'll output the same way as what you are pasting in.
Re:Show HN: HTMLify - Turn code snippets into HTML, for tech...
by oakaz on Saturday May 18, 2013 @07:38AM
(#5728571)
no colors?
I would just prefer to wrap my code with <pre></pre> instead of using a whitespace generator which makes pain in the ass to make modifications on the code.
Re:Show HN: HTMLify - Turn code snippets into HTML, for tech...
by Nurdok on Saturday May 18, 2013 @07:51AM
(#5728600)
I blog with tumblr (http://blog.amir.rachum.com) and HTML is the only viable option I see there. Yeah, I probably need to change my venue :)
In any case, this project (as stated in the footer) is more of an experience for me. I don't expect this to revolutionize anything. Just a nice tool which I personally need.
Re:Show HN: HTMLify - Turn code snippets into HTML, for tech...
by tuananh on Saturday May 18, 2013 @09:28AM
(#5728825)
this can be done easily with a script as it simply wrap the tex with a pre tag. i don't see the need for this kind of thing. tech bloggers usually got enough knowledge for this kind of stuff.
This seems like a slightly extended htmlentities(nl2br($input)) (if done in php). handy in those times you need stuff converted so it'll output the same way as what you are pasting in.
It's pretty configurable, and outputs something like this (both the pastebin and linked paste make use of it):
https://paste.buttscicl.es/u/877a8d68d88239985e6bb39a4ccaa81...
I would just prefer to wrap my code with <pre></pre> instead of using a whitespace generator which makes pain in the ass to make modifications on the code.
Edit: you mean, show a rendering of the output in the page?
Edit: actually, never mind. The UI is fine for its intended use.
http://www.emacswiki.org/emacs/Htmlize
or
http://www.emacswiki.org/emacs/HtmlFontify
With the #+BEGIN_SRC tag you can automatically get an export of code set by the emacs-mode for that language, in addition to markup for other text.
I don't see why you feel a need to call it useless, just because it doesn't apply to markdown.