[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Formatting C (or other code) to HTML for blog posts
From: |
Xah |
Subject: |
Re: Formatting C (or other code) to HTML for blog posts |
Date: |
Thu, 30 Oct 2008 09:41:32 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Oct 30, 8:45 am, Alex Bennee <ajb...@cbnl.com> wrote:
> Hi,
>
> Is there a function that will format some source code into HTML so I
> don't loose formatting from the spaces and tabs being eaten up. Usually
> I would wrap the code in <pre> but for various reasons this is not so
> easy to do (the blog software chews double spaces).
>
> It would be extra nice if the function did pretty syntax highlighting!
>
> I tried format-encode-region to html but that didn't seem to so what I
> wanted (or at least I didn't see a bunch of &nsp;'s and <br>'s appear).
not sure about blogs because their support for raw html differs.
anyhow, i use htmlize and am very happy about it. For detail, see:
http://xahlee.org/emacs/elisp_htmlize.html
Xah
∑ http://xahlee.org/
☄