Roland Kaufmann <roland.kaufm...@gmail.com> writes:

>> htmlize doesn't operate on the level of syntax-based fontification, it
>> examines the display-related properties attached to buffer text (not
>> necessarily by font-lock) and renders them into the corresponding HTML.
>
> Good point.
>
> And, as you point out, it is probably better to deal with the problem
> by removing the formatting on the newlines (probably right after
> font-lock-fontify-buffer in org-export-format-source-code-or-example)
> in the temporary buffer that is htmlize'd, reducing the chance of any
> unintended consequences.

Yes, tweaking the properties seems preferable to tweaking htmlize itself
for this particular case.

In the future I'd like htmlize to be more extensible about converting
buffer contents to HTML.  Currently it only examines the `face' and
`invisible' properties that Emacs itself uses for display.  But
additional properties could be defined, which htmlize would use to
discern hyperlinks, or to add line highlight markup, to override choice
of style sheet, etc.

> I'll try this approach and see how it turns out (i.e. proposal for
> change in htmlize dropped). Thank you for the feedback!

Thanks for sticking with this.  Please let me know how it works for you.

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to