mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 00:02:50 -06:00
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:
@@ -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 ++ "]"
|
||||
Reference in New Issue
Block a user