summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES8
-rw-r--r--sphinx/domains/cpp.py7
-rw-r--r--sphinx/setup_command.py1
-rw-r--r--tests/test_env.py6
4 files changed, 13 insertions, 9 deletions
diff --git a/CHANGES b/CHANGES
index e593be3ce..0a7ae7ea9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -26,9 +26,15 @@ Release 1.1 (in development)
* #526: Added Iranian translation.
-Release 1.0.5 (in development)
+Release 1.0.6 (in development)
==============================
+* Several fixes to the C++ domain.
+
+
+Release 1.0.5 (Nov 12, 2010)
+============================
+
* #557: Add CSS styles required by docutils 0.7 for aligned images
and figures.
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py
index d45fd5721..ffa76f4eb 100644
--- a/sphinx/domains/cpp.py
+++ b/sphinx/domains/cpp.py
@@ -23,7 +23,7 @@ from sphinx.util.nodes import make_refnode
from sphinx.util.compat import Directive
-_identifier_re = re.compile(r'\b(~?[a-zA-Z_][a-zA-Z0-9_]*)\b')
+_identifier_re = re.compile(r'(~?\b[a-zA-Z_][a-zA-Z0-9_]*)\b')
_whitespace_re = re.compile(r'\s+(?u)')
_string_re = re.compile(r"[LuU8]?('([^'\\]*(?:\\.[^'\\]*)*)'"
r'|"([^"\\]*(?:\\.[^"\\]*)*)")', re.S)
@@ -697,14 +697,13 @@ class DefinitionParser(object):
self.fail('expected comma between arguments')
self.skip_ws()
- argname = self._parse_type()
- argtype = default = None
+ argtype = self._parse_type()
+ argname = default = None
self.skip_ws()
if self.skip_string('='):
self.pos += 1
default = self._parse_default_expr()
elif self.current_char not in ',)':
- argtype = argname
argname = self._parse_name()
self.skip_ws()
if self.skip_string('='):
diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py
index 5fe34f184..ffe17417c 100644
--- a/sphinx/setup_command.py
+++ b/sphinx/setup_command.py
@@ -111,7 +111,6 @@ class BuildDoc(Command):
build = self.get_finalized_command('build')
self.build_dir = os.path.join(build.build_base, 'sphinx')
self.mkpath(self.build_dir)
- self.ensure_dirname('build_dir')
self.doctree_dir = os.path.join(self.build_dir, 'doctrees')
self.mkpath(self.doctree_dir)
self.builder_target_dir = os.path.join(self.build_dir, self.builder)
diff --git a/tests/test_env.py b/tests/test_env.py
index 124ed08cd..a8d6bac2d 100644
--- a/tests/test_env.py
+++ b/tests/test_env.py
@@ -29,7 +29,7 @@ def teardown_module():
def warning_emitted(file, text):
for warning in warnings:
- if len(warning) == 2 and file+':' in warning[1] and text in warning[0]:
+ if len(warning) == 2 and file in warning[1] and text in warning[0]:
return True
return False
@@ -47,8 +47,8 @@ def test_first_update():
assert 'subdir/excluded' not in env.found_docs
def test_images():
- assert warning_emitted('images.txt', 'image file not readable: foo.png')
- assert warning_emitted('images.txt', 'nonlocal image URI found: '
+ assert warning_emitted('images', 'image file not readable: foo.png')
+ assert warning_emitted('images', 'nonlocal image URI found: '
'http://www.python.org/logo.png')
tree = env.get_doctree('images')