浏览代码

Process summaries working correctly with render_math

Barry Steyn 10 年之前
父节点
当前提交
d058557aca
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      render_math/math.py

+ 1 - 1
render_math/math.py

@@ -196,7 +196,7 @@ def process_summary(instance):
         if len(last_math_text) > 3 and last_math_text[-3:] == '...':
             content_parsed = BeautifulSoup(instance._content, 'html.parser')
             full_text = content_parsed.find_all(class_='math')[len(math)-1].get_text()
-            math[-1].replace_with("%s\ \ldots\)" % full_text[:-2])
+            math[-1].string = "%s ..." % full_text
             summary = summary_parsed.encode('ascii')
   
         instance._summary = "%s<script type='text/javascript'>%s</script>" % (summary, process_summary.mathjax_script)