Don't dump the stack before a [[link]].
authorrich <rich>
Tue, 14 Sep 2004 15:59:13 +0000 (15:59 +0000)
committerrich <rich>
Tue, 14 Sep 2004 15:59:13 +0000 (15:59 +0000)
scripts/wikilib.ml

index da60d68..c7062a5 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: wikilib.ml,v 1.3 2004/09/09 12:21:22 rich Exp $
+ * $Id: wikilib.ml,v 1.4 2004/09/14 15:59:13 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
@@ -346,8 +346,8 @@ let _markup_paragraph dbh hostid text =
               escape_html first :: "<" :: elem :: ">" ::
                 loop (rest, elem :: stack)
           | FoundLink (first, link, rest) ->
-              (* pop everything off the stack first *)
-              escape_html first :: loop ("", stack) @ link :: loop (rest, [])
+              (* link *)
+              escape_html first :: link :: loop (rest, stack)
        )
   in