Added anchors to category constructors in synopsis, and links form the explanations table. The categories in function types should also be links, but that is a bit difficult with the current MkSynopsis implementation which inspects the generated txt2tags code to make the section headr for each category.

This commit is contained in:
bringert
2007-11-05 10:48:58 +00:00
parent 9045fb2851
commit fe49c9f1bf
2 changed files with 137 additions and 187 deletions

View File

@@ -127,7 +127,7 @@ mkCatTable isBeg rs =
(if isBeg then ("|| Category | Explanation | Example ||" :) else id)
(map mk1 rs)
where
mk1 (name,typ,ex) = unwords ["|", ttf name, "|", typ, "|", typo ex, "|"]
mk1 (name,typ,ex) = unwords ["|", showCat name, "|", typ, "|", typo ex, "|"]
typo ex = if take 1 ex == "\"" then itf (init (tail ex)) else ex
synopsis = "synopsis.txt"
@@ -197,5 +197,6 @@ sortVal = sortBy (\t u -> compare (hd t) (hd u)) where
printBack hd tb = unlines $ subtitle (valRow (head tb)) : "\n" : [hd] ++ tb
subtitle cat = "==" ++ cat ++ "=="
subtitle cat = "==" ++ cat ++ "==" ++ "[" ++ cat ++ "]"
showCat cat = "[" ++ cat ++ " #" ++ cat ++ "]"