Commit df5bf1cc authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-11-20 11:23:27 by szach] added support for unnamed boxes

Original author: szach
Date: 2003-11-20 11:23:27+00:00
parent c680afb5
......@@ -17,7 +17,7 @@ type Page = <page name=String new=?Any>[ <title>String <banner>[InlineText*]? I
type External = <external {|href=String; title=String; name=String |}>[]
type Item =
<box title=String link=String>Content
<box noindex=?String title=String link=String>Content
| <meta>Content
| <left>Content
| Page
......@@ -133,7 +133,8 @@ let boxes_of (Page -> [H:Xul?])
<page name=n>[ (items::Item | _)*] ->
let toc =
transform items with
<box title=t link=l>_ -> [ <li>[ <a href=((url_of_name n)@('#',l))>t ] ] in
| <box noindex=_>_ -> []
| <box title=t link=l>_ -> [ <li>[ <a href=((url_of_name n)@('#',l))>t ] ] in
(match toc with [] -> [] | lis -> [ <ul>lis ])
let link_to (Page -> H:Xa)
......@@ -266,7 +267,8 @@ match page with
| <boxes-toc (a)>[] ->
let toc =
transform items with
<box title=t link=l>b -> [ <li>[ <a href=('#',l)>t
| <box noindex=_>_ -> []
| <box title=t link=l>b -> [ <li>[ <a href=('#',l)>t
!(match a with
| {|sections=_|} ->
(transform b with <section title=t>_ -> [<br>[] '-' !t])
......
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