Commit Graph

5 Commits

Author SHA1 Message Date
Matt Mackall
e564d351f3 extensions: use new wrapper functions 2008-10-22 17:34:52 -05:00
Dirkjan Ochtman
c5e3760e1d help: better documentation intro for a few extensions 2008-10-18 16:56:39 +02:00
Christian Ebert
5cbc9e210a highlight: convert text to local before passing to pygmentize (issue1341)
Example case:
Display file written in iso-8859-1 with current HGENCODING utf-8.
At the moment only an Error page appears because pygmentize
chokes on the replacement chars.

Alternatives:
1) Turn off highlighting and avoid UnicodeDecodeError
   for files that are not in HGENCODING.
2) [this patch] use util.tolocal to display these files.

Alternative 2) seems ok, as this only concerns display and
readability.

See also: c5f1a58b8b9a, apparently put aside during refactor of
highlight.

Add test for UnicodeDecodeError with iso-8859-1 file contents.
2008-10-17 12:12:33 +02:00
Rocco Rutte
cc79439de6 highlight: only pygmentize for HTML mimetypes
For non-html mimetypes it doesn't make much sense. This also fixes the
issue that highlight unconditionally adds a <link/> tag for its CSS to
the template's header (which is pointless in text/plain output).
2008-09-05 10:39:57 +02:00
Patrick Mezard
99f53b6386 highlight: split code to improve startup times 2008-08-25 23:04:56 +02:00