Skip to content

Commit

Permalink
Make 'class' option to wrap directive optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm committed Dec 30, 2013
1 parent 0965e08 commit cc998cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def run(self):
element_id = self.options.get('id', None)
if element_id is not None:
node['ids'].append(element_id)
node['classes'].extend(self.options['class'])
cls = self.options.get('class')
if cls:
node['classes'].extend(cls)
self.add_name(node)
self.state.nested_parse(self.content, self.content_offset, node)
return [node]
Expand Down

0 comments on commit cc998cc

Please sign in to comment.