summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2013-03-28 15:57:17 +0000
committerhallgren <hallgren@chalmers.se>2013-03-28 15:57:17 +0000
commit08046137cb702787dd1620ce5e451926a73725ae (patch)
tree1dd39a50dd1cd0819e3afe9f40017400ed6cdf78 /src/server
parent74a16273b99632caf94912a4a4510d17cc88abac (diff)
PGF web API: command=abstrtree not supports the nocat and nofun options
Diffstat (limited to 'src/server')
-rw-r--r--src/server/PGFService.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/PGFService.hs b/src/server/PGFService.hs
index 6b367e1c9..24152ca53 100644
--- a/src/server/PGFService.hs
+++ b/src/server/PGFService.hs
@@ -69,7 +69,7 @@ pgfMain command pgf =
"translate" -> out =<< doTranslate pgf # text % cat % from % to % limit
"translategroup" -> out =<< doTranslateGroup pgf # text % cat % from % to % limit
"grammar" -> out =<< doGrammar pgf # requestAcceptLanguage
- "abstrtree" -> outputGraphviz . abstrTree pgf =<< tree
+ "abstrtree" -> outputGraphviz =<< abstrTree pgf # graphvizOptions % tree
"alignment" -> outputGraphviz =<< alignment pgf # tree % to
"parsetree" -> do t <- tree
Just l <- from
@@ -364,8 +364,11 @@ outputGraphviz code =
-- ...
_ -> "application/binary"
-abstrTree pgf tree = PGF.graphvizAbstractTree pgf (True,True) tree
+abstrTree pgf opts tree = PGF.graphvizAbstractTree pgf opts' tree
+ where opts' = (not (PGF.noFun opts),not (PGF.noCat opts))
+
parseTree pgf lang opts tree = PGF.graphvizParseTree pgf lang opts tree
+
alignment pgf tree tos = PGF.graphvizAlignment pgf tos' tree
where tos' = if null tos then PGF.languages pgf else tos