Commit aa6eccb0 authored by stolpmann's avatar stolpmann

Bugfix in encode_as_pre (TAB expansion was wrong)


git-svn-id: https://godirepo.camlcity.org/svn/wdialog/trunk@188 f54c9a64-0731-4a92-b797-30fd5898f27c
parent 161470a6
......@@ -21,7 +21,7 @@
* </>
*)
(* $Id: wd_encoding.ml,v 3.5 2003-03-21 12:50:31 stolpmann Exp $
(* $Id: wd_encoding.ml,v 3.6 2004-03-30 22:16:37 stolpmann Exp $
* ----------------------------------------------------------------------
*
*)
......@@ -96,10 +96,10 @@ let encode_as_pre =
function
" " -> "&nbsp;"
| "\r" -> "" (* simply drop *)
| "\n" -> last_nl := pos; "<br>"
| "\n" -> last_nl := pos+1; "<br>"
| "\t" ->
let spaces = 8 - (pos - !last_nl) mod 8 in
last_nl := pos;
last_nl := pos+1;
repeat spaces "&nbsp;"
| _ ->
assert false
......@@ -208,7 +208,10 @@ let encode_as_js_longstring ~(enc : Pxp_types.rep_encoding) s =
* History:
*
* $Log: wd_encoding.ml,v $
* Revision 3.5 2003-03-21 12:50:31 stolpmann
* Revision 3.6 2004-03-30 22:16:37 stolpmann
* Bugfix in encode_as_pre (TAB expansion was wrong)
*
* Revision 3.5 2003/03/21 12:50:31 stolpmann
* Fix: encode_as_js_longstring can cope with UTF8-encoded strings
*
* Revision 3.4 2003/03/08 17:46:48 stolpmann
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment