# HG changeset patch # User reno # Date 1260529359 -3600 # Node ID a480a91d63ca6130c832b35a8f63ddbf7d94e52c # Parent b32aa76ee411b693df1565e5c27402f35e194a72 BUG FIX : pdf export PhA tests, TODO fix special html caracters in comments diff -r b32aa76ee411 -r a480a91d63ca src/cm/utils/comment_positioning.py --- a/src/cm/utils/comment_positioning.py Fri Dec 11 11:48:10 2009 +0100 +++ b/src/cm/utils/comment_positioning.py Fri Dec 11 12:02:39 2009 +0100 @@ -148,10 +148,10 @@ html = get_the_soup(htmlcontent) ; # import pdb;pdb.set_trace() - - max_wrapper = max([comment.end_wrapper for comment in comments]) - min_wrapper = min([comment.start_wrapper for comment in comments]) - + if comments : + max_wrapper = max([comment.end_wrapper for comment in comments]) + min_wrapper = min([comment.start_wrapper for comment in comments]) + datas = {} # { wrapper_id : {'start_color':nb_of_comments_unterminated_at_wrapper_start, 'offsets':{offset: [[ids of wrappers starting at offset], [ids of wrappers ending at offset]]}} # datas['offsets'][someoffset][0] and idem[1] will be ordered the way comments are (should be ('start_wrapper', 'start_offset', 'end_wrapper', 'end_offset') important) cpt = 1 # starting numbered comment