Skip to content

Commit

Permalink
The comments point out the bug. The code is just a quick and dirty fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
dean0x7d committed Oct 19, 2015
1 parent a066375 commit da8bc0b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions breathe/directive/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def render(self, node_stack, project_info, options, filter_, target_handler, mas
renderer_factory_creator = self.renderer_factory_creator_constructor.create_factory_creator(
project_info,
self.state.document,
options,
options, # not used in the call
target_handler
)

Expand All @@ -83,6 +83,9 @@ def render(self, node_stack, project_info, options, filter_, target_handler, mas
except FileIOError as e:
return format_parser_error("doxygenclass", e.error, e.filename, self.state, self.lineno)

context = RenderContext(node_stack, mask_factory, self.directive_args)
# Quick hack to get it working: inject options here
directive_args = self.directive_args[:]
directive_args[2] = options
context = RenderContext(node_stack, mask_factory, directive_args)
object_renderer = renderer_factory.create_renderer(context)
return object_renderer.render()
2 changes: 1 addition & 1 deletion breathe/directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def resolve_function(self, matches, args, project_info):
# Iterate over the potential matches
for entry in matches:

text_options = {'no-link': u'', 'outline': u''}
text_options = {'no-link': u'', 'outline': u''} # this is never used

# Render the matches to docutils nodes
target_handler = self.target_handler_factory.create_target_handler(
Expand Down
1 change: 1 addition & 0 deletions breathe/renderer/rst/doxygen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ def __init__(

def create_factory_creator(self, project_info, document, options, target_handler):

# the argument `options` is never used
return DoxygenToRstRendererFactoryCreator(
self.node_factory,
self.parser_factory,
Expand Down

0 comments on commit da8bc0b

Please sign in to comment.