Explorar o código

Process summaries working correctly with render_math

Barry Steyn %!s(int64=10) %!d(string=hai) anos
pai
achega
d058557aca
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)