diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2015-12-07 01:03:56 -0800 |
---|---|---|
committer | rockon999 <rockon999@users.noreply.github.com> | 2018-08-06 02:53:45 -0500 |
commit | 26560766ce3505ef4f5b09b41f13895346133f3a (patch) | |
tree | 8b07da06da010f064cf7f570a5c0d5a3dbd34736 /giscanner/doctemplates | |
parent | dbcc0f8af23ccd385a1edd888034e79c47908520 (diff) | |
download | gobject-introspection-26560766ce3505ef4f5b09b41f13895346133f3a.tar.gz |
devdocs: Format the values of constants
We change the style of documentation pages for constants, so that their
values are displayed in a <dt>/<dd> pair. We add a new method to the
formatter family, format_value() which should print the representation of
a constant's value in the target language; much like repr() in Python.
Diffstat (limited to 'giscanner/doctemplates')
-rw-r--r-- | giscanner/doctemplates/devdocs/Gjs/default.tmpl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/giscanner/doctemplates/devdocs/Gjs/default.tmpl b/giscanner/doctemplates/devdocs/Gjs/default.tmpl index 5130fadc..0c0fdf6c 100644 --- a/giscanner/doctemplates/devdocs/Gjs/default.tmpl +++ b/giscanner/doctemplates/devdocs/Gjs/default.tmpl @@ -1,6 +1,10 @@ <%inherit file="base.tmpl"/> % if isinstance(node, ast.Constant): - <code> - const ${formatter.format_page_name(node)} = ${node.value}; - </code> + <dl> + <dt>Value</dt> + <dd> + <code data-mime="application/javascript"><!-- + -->${formatter.format_value(node)}</code> + </dd> + </dl> % endif |