From 5f2b5d4ad41ad8a0620227f87b394a687359c29b Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Thu, 8 Aug 2013 21:24:17 -0400 Subject: [PATCH] Docs: fix node constructed by code_literal role --- src/sphinx/_sphinx/exts/codeliteral.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sphinx/_sphinx/exts/codeliteral.py b/src/sphinx/_sphinx/exts/codeliteral.py index d401e6ffa..7f8557e1b 100644 --- a/src/sphinx/_sphinx/exts/codeliteral.py +++ b/src/sphinx/_sphinx/exts/codeliteral.py @@ -20,7 +20,7 @@ def process_node(node): # This directive formats a string to be in a fixed width font. # The string is taken as a literal and is not processed for further inline formatting. def code_literal(name, rawtext, text, lineno, inliner, options={}, content=[]): - node = nodes.Text(text, text) + node = nodes.inline('', text) node['classes'].append('pre') return [node], []