Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
2c995219
Commit
2c995219
authored
Dec 13, 2019
by
Loïc Correnson
Browse files
[server] provide category in index title entries
parent
98d6ca75
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/server/request.ml
View file @
2c995219
...
...
@@ -296,6 +296,7 @@ let register_sig (type a b) (s : (a,b) signature) (process : rq -> a -> b) =
in
let
skind
=
Main
.
string_of_kind
s
.
kind
in
let
title
=
Printf
.
sprintf
"`%s` %s"
skind
s
.
name
in
let
index
=
[
Printf
.
sprintf
"%s (`%s`)"
s
.
name
skind
]
in
let
header
=
[
plain
"Input"
,
Center
;
plain
"Output"
,
Center
]
in
let
content
=
[[
Syntax
.
text
@@
sy_input
s
.
input
;
...
...
@@ -308,7 +309,7 @@ let register_sig (type a b) (s : (a,b) signature) (process : rq -> a -> b) =
doc_output
s
.
output
in
let
_
=
Doc
.
publish
~
page
:
s
.
page
~
name
:
s
.
name
~
title
~
index
:
[
s
.
name
]
description
[]
Doc
.
publish
~
page
:
s
.
page
~
name
:
s
.
name
~
title
~
index
description
[]
in
Main
.
register
s
.
kind
s
.
name
processor
;
s
.
defined
<-
true
...
...
src/plugins/server/syntax.ml
View file @
2c995219
...
...
@@ -65,12 +65,13 @@ let publish ~page ~name ~descr ~synopsis ?(details = []) () =
check_page
page
name
;
let
id
=
Printf
.
sprintf
"data-%s"
name
in
let
title
=
Printf
.
sprintf
"`DATA` %s"
name
in
let
dref
=
Doc
.
href
page
id
in
let
index
=
[
Printf
.
sprintf
"%s (`DATA`)"
name
]
in
let
dref
=
Doc
.
href
page
id
in
let
dlink
=
Markdown
.
href
~
text
:
(
Markdown
.
emph
name
)
dref
in
let
syntax
=
Markdown
.(
glue
[
plain
"<"
;
dlink
;
plain
">"
;
plain
":="
;
synopsis
.
text
])
in
let
content
=
Markdown
.(
Block
(
text
descr
@
text
syntax
)
::
details
)
in
let
_href
=
Doc
.
publish
~
page
~
name
:
id
~
title
~
index
:
[
name
]
content
[]
in
let
_href
=
Doc
.
publish
~
page
~
name
:
id
~
title
~
index
content
[]
in
atom
dlink
let
unit
=
atom
@@
Markdown
.
plain
"-"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment