mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#178: apply `add_function_parentheses
` config value to C functions as promised.
This commit is contained in:
parent
4cbfac0589
commit
224104724a
3
CHANGES
3
CHANGES
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -179,6 +179,11 @@ Invalid index markup...
|
||||
Testing öäü...
|
||||
|
||||
|
||||
Object markup
|
||||
-------------
|
||||
|
||||
:cfunc:`CFunction`.
|
||||
|
||||
Only directive
|
||||
--------------
|
||||
|
||||
|
@ -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']": '',
|
||||
|
Loading…
Reference in New Issue
Block a user