Blob Blame History Raw
From 1f10b0b937eeb28adced360d4fa2ca76e4fe9191 Mon Sep 17 00:00:00 2001
From: Randy Barlow <randy@electronsweatshop.com>
Date: Tue, 7 Mar 2017 22:03:10 -0500
Subject: [PATCH] Initialize the ref_context as a dictionary.

fixes #7

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
---
 cornice/ext/sphinxext.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cornice/ext/sphinxext.py b/cornice/ext/sphinxext.py
index fe00926..b00fb44 100644
--- a/cornice/ext/sphinxext.py
+++ b/cornice/ext/sphinxext.py
@@ -284,6 +284,7 @@ def rst2node(data):
     document.settings.rfc_references = False
     document.settings.character_level_inline_markup = False
     document.settings.env = Env()
+    document.settings.env.ref_context = {}
     parser.parse(data, document)
     if len(document.children) == 1:
         return document.children[0]
-- 
2.12.0