src/cm/views/texts.py
changeset 232 a6c6b046a9c0
parent 231 e71ea24ff34c
child 234 b33dd64a57f0
equal deleted inserted replaced
231:e71ea24ff34c 232:a6c6b046a9c0
   350             
   350             
   351     if len(comments) == 0 : #want to bypass html conversion in this case
   351     if len(comments) == 0 : #want to bypass html conversion in this case
   352         return content_export2(request, original_content, text_version.title, original_format, format, use_pandoc, download_response)
   352         return content_export2(request, original_content, text_version.title, original_format, format, use_pandoc, download_response)
   353     else : # case comments to be added  
   353     else : # case comments to be added  
   354         #comments = comments.order_by('start_wrapper','start_offset','end_wrapper','end_offset')
   354         #comments = comments.order_by('start_wrapper','start_offset','end_wrapper','end_offset')
   355         html = text_version.get_content()
   355         html = pandoc_convert(original_content, original_format, 'html')
   356         wrapped_text_version, _ , _ = spannify(html)
   356         wrapped_text_version, _ , _ = spannify(html)
   357         with_markers = True
   357         with_markers = True
   358         marked_content = insert_comment_markers(wrapped_text_version, comments, with_markers, with_color)
   358         marked_content = insert_comment_markers(wrapped_text_version, comments, with_markers, with_color)
   359     
   359     
   360         viewable_comments = comments_thread(request, text_version, text) 
   360         viewable_comments = comments_thread(request, text_version, text)