X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fpreview.ml;h=df0da8d516d43477c3ab50ddbcb985537fbbc0d7;hb=e336401181f56f19ec18175d47462e7a5d5f07e2;hp=10e8a4acfc31d5f8dd31bf1d9a9a0192407db334;hpb=1e757a53a78e6b288f483b3b689a600d20575562;p=cocanwiki.git diff --git a/scripts/preview.ml b/scripts/preview.ml index 10e8a4a..df0da8d 100644 --- a/scripts/preview.ml +++ b/scripts/preview.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: preview.ml,v 1.6 2004/10/23 12:00:24 rich Exp $ + * $Id: preview.ml,v 1.7 2004/12/20 11:57:28 rich Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,6 +29,12 @@ open Printf open Cocanwiki +(* This script is called very frequently indeed during editing. It should + * therefore be as short and fast as possible. There is a case for + * special-casing the register_script code to avoid doing as much + * start-up SQL as possible. + *) + let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = let content = q#param "content" in let xhtml = Wikilib.xhtml_of_content dbh hostid content in