瀏覽代碼

Merge pull request #683 from SirEdvin/master

render_math: Fix DOCUTILS_SETTINGS support
Justin Mayer 9 年之前
父節點
當前提交
df863c6c2e
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      render_math/math.py

+ 3 - 2
render_math/math.py

@@ -274,8 +274,9 @@ def mathjax_for_markdown(pelicanobj, mathjax_script, mathjax_settings):
 
 def mathjax_for_rst(pelicanobj, mathjax_script):
     """Setup math for RST"""
-
-    pelicanobj.settings['DOCUTILS_SETTINGS'] = {'math_output': 'MathJax'}
+    docutils_settings = pelicanobj.settings.get('DOCUTILS_SETTINGS', {})
+    docutils_settings['math_output'] = 'MathJax'
+    pelicanobj.settings['DOCUTILS_SETTINGS'] = docutils_settings
     rst_add_mathjax.mathjax_script = mathjax_script
 
 def pelican_init(pelicanobj):