diff --git a/sensio/sphinx/configurationblock.py b/sensio/sphinx/configurationblock.py index 67ae43a..b2fd237 100644 --- a/sensio/sphinx/configurationblock.py +++ b/sensio/sphinx/configurationblock.py @@ -54,8 +54,12 @@ def run(self): #targetid = "configuration-block-%d" % env.new_serialno('configuration-block') #targetnode = nodes.target('', '', ids=[targetid]) #targetnode.append(child) + if 'language' in child: + language = child['language'] + else: + language = env.app.config.highlight_language - innernode = nodes.emphasis(self.formats[child['language']], self.formats[child['language']]) + innernode = nodes.emphasis(self.formats[language], self.formats[language]) para = nodes.paragraph() para += [innernode, child]