On 11/09/13 20:10, Přemysl Janouch wrote:
> Previously the script tried to encode output from Pygments with
> the ASCII codec, which failed.
> 
> Signed-off-by: Přemysl Janouch <[email protected]>
> ---
>  filters/syntax-highlighting.py |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/filters/syntax-highlighting.py b/filters/syntax-highlighting.py
> index dcdba03..75c144a 100755
> --- a/filters/syntax-highlighting.py
> +++ b/filters/syntax-highlighting.py
> @@ -25,6 +25,7 @@ from pygments import highlight
>  from pygments.formatters import HtmlFormatter
>  
>  sys.stdin = codecs.getreader("utf-8")(sys.stdin.detach())
> +sys.stdout = codecs.getreader("utf-8")(sys.stdout.detach())
>  doc = sys.stdin.read()
>  try:
>       lexer = get_lexer_for_filename(sys.argv[1])
> 

Excuse me, of course it should be a writer, not a reader:
-sys.stdout = codecs.getreader("utf-8")(sys.stdout.detach())
+sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())

Regards,
Přemysl Janouch


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
CGit mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to