#178: apply `add_function_parentheses` config value to C functions as promised.

This commit is contained in:
Georg Brandl 2009-05-22 18:53:58 +02:00
parent 4cbfac0589
commit 224104724a
4 changed files with 16 additions and 0 deletions

View File

@ -1,6 +1,9 @@
Release 0.6.2 (in development)
==============================
* #178: apply ``add_function_parentheses`` config value to C
functions as promised.
* #173: Respect the docutils ``title`` directive.
* #172: The ``obj`` role now links to modules as promised.

View File

@ -193,6 +193,13 @@ def xfileref_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
elif typ == 'ref':
# reST label names are always lowercased
target = ws_re.sub('', target).lower()
elif typ == 'cfunc':
# fix-up parens for C functions too
if titleistarget:
title = _fix_parens(typ, title, env)
# remove parentheses from the target too
if target.endswith('()'):
target = target[:-2]
else:
# remove all whitespace to avoid referencing problems
target = ws_re.sub('', target)

View File

@ -179,6 +179,11 @@ Invalid index markup...
Testing öäü...
Object markup
-------------
:cfunc:`CFunction`.
Only directive
--------------

View File

@ -94,6 +94,7 @@ HTML_XPATH = {
".//p": 'In both.',
".//p": 'Always present',
".//title": 'set by title directive',
".//span[@class='pre']": 'CFunction()',
},
'desc.html': {
".//dt[@id='mod.Cls.meth1']": '',