[FIX] syntax highlighting settings on a pair of code blocks

bzr revid: xmo@openerp.com-20110617102931-85kof2qm1m5psnwl
This commit is contained in:
Xavier Morel 2011-06-17 12:29:31 +02:00
parent 23d76c574f
commit ff50ec6407
1 changed files with 13 additions and 6 deletions

View File

@ -65,7 +65,7 @@ Do not leave trailing commas in object literals
While it is legal to leave trailing commas in Python dictionaries, e.g. While it is legal to leave trailing commas in Python dictionaries, e.g.
:: .. code-block:: python
foo = { foo = {
'a': 1, 'a': 1,
@ -111,14 +111,18 @@ RST, using Sphinx's `Python domain`_ [#]_:
docstring, using Sphinx's `info fields`_ docstring, using Sphinx's `info fields`_
For parameters types, built-in and stdlib types should be using the For parameters types, built-in and stdlib types should be using the
combined syntax:: combined syntax:
.. code-block:: restructuredtext
:param dict foo: what the purpose of foo is :param dict foo: what the purpose of foo is
unless a more extensive explanation needs to be given (e.g. the unless a more extensive explanation needs to be given (e.g. the
specification that the input should be a list of 3-tuple needs to specification that the input should be a list of 3-tuple needs to
use ``:type:`` even though all types involved are built-ins). Any use ``:type:`` even though all types involved are built-ins). Any
other type should be specified in full using the ``:type:`` field:: other type should be specified in full using the ``:type:`` field
.. code-block:: restructuredtext
:param foo: what the purpose of foo is :param foo: what the purpose of foo is
:type foo: some.addon.Class :type foo: some.addon.Class
@ -154,12 +158,16 @@ when writing javascript API documentation:
are not documented, or JsDoc will not understand what they are and are not documented, or JsDoc will not understand what they are and
will not generate documentation for their content. will not generate documentation for their content.
As a result, the bare minimum for a namespace is:: As a result, the bare minimum for a namespace is:
.. code-block:: javascript
/** @namespace */ /** @namespace */
foo.bar.baz = {}; foo.bar.baz = {};
while for a class it is:: while for a class it is:
.. code-block:: javascript
/** @class */ /** @class */
foo.bar.baz.Qux = [...] foo.bar.baz.Qux = [...]
@ -256,7 +264,6 @@ with the descriptions and irrelevant atttributes stripped):
.. code-block:: javascript .. code-block:: javascript
openerp.base.search.Widget = openerp.base.Controller.extend( openerp.base.search.Widget = openerp.base.Controller.extend(
/** @lends openerp.base.search.Widget# */{ /** @lends openerp.base.search.Widget# */{
/** /**