Commits

Eric Knibbe committed 7fe6d95 Merge

Enabled use of add_function_parentheses option

Comments (0)

Files changed (2)

lassodomain/README.rst

 
 After installing ``lassodomain.py`` in ``site-packages/sphinxcontrib``, add the
 ``sphinxcontrib.lassodomain`` extension to the ``extensions`` list in your
-Sphinx configuration file (``conf.py``)::
+Sphinx configuration file (``conf.py``):
+
+.. code-block:: python
 
    extensions = ['sphinxcontrib.lassodomain']
 
 Also, if your project is primarily Lasso, you'll want to define the primary
-domain as well::
+domain as well:
+
+.. code-block:: python
 
    primary_domain = 'ls'
 
 
 Use :ls:meth:`array->exchange` to swap the position of two array elements.
 
+A set of empty parentheses ``()`` will be appended, if absent, to method
+cross-references by default. This can be reversed by setting
+``add_function_parentheses = False`` in your project's ``conf.py``, causing them
+to be removed if present.

lassodomain/sphinxcontrib/lassodomain.py

         'thread':  LSDefinition,
     }
     roles = {
-        'meth':   LSXRefRole(),
+        'meth':   LSXRefRole(fix_parens=True),
         'type':   LSXRefRole(),
         'trait':  LSXRefRole(),
         'thread': LSXRefRole(),