##// END OF EJS Templates
Fixed post reply parsing
neko259 -
r406:c7fb6785 default
parent child Browse files
Show More
@@ -43,9 +43,10 b' class ReflinkPattern(Pattern):'
43 ref_element = etree.Element('a')
43 ref_element = etree.Element('a')
44
44
45 post = posts[0]
45 post = posts[0]
46 if post.thread:
46 if not post.is_opening():
47 link = reverse(boards.views.thread, kwargs={'post_id': post.thread.id}) \
47 link = reverse(boards.views.thread, kwargs={
48 + '#' + post_id
48 'post_id': post.thread_new.get_opening_post().id})\
49 + '#' + post_id
49 else:
50 else:
50 link = reverse(boards.views.thread, kwargs={'post_id': post_id})
51 link = reverse(boards.views.thread, kwargs={'post_id': post_id})
51
52
@@ -99,11 +100,11 b' class NeboardMarkdown(markdown.Extension'
99 reflink = ReflinkPattern(REFLINK_PATTERN, md)
100 reflink = ReflinkPattern(REFLINK_PATTERN, md)
100 spoiler = SpoilerPattern(SPOILER_PATTERN, md)
101 spoiler = SpoilerPattern(SPOILER_PATTERN, md)
101 comment = CommentPattern(COMMENT_PATTERN, md)
102 comment = CommentPattern(COMMENT_PATTERN, md)
102 strikethrough = StrikeThroughPattern(STRIKETHROUGH_PATTERN, md)
103 strikethrough = StrikeThroughPattern(STRIKETHROUGH_PATTERN, md)
103
104
104 md.inlinePatterns[u'autolink_ext'] = autolink
105 md.inlinePatterns[u'autolink_ext'] = autolink
105 md.inlinePatterns[u'spoiler'] = spoiler
106 md.inlinePatterns[u'spoiler'] = spoiler
106 md.inlinePatterns[u'strikethrough'] = strikethrough
107 md.inlinePatterns[u'strikethrough'] = strikethrough
107 md.inlinePatterns[u'comment'] = comment
108 md.inlinePatterns[u'comment'] = comment
108 md.inlinePatterns[u'reflink'] = reflink
109 md.inlinePatterns[u'reflink'] = reflink
109 md.inlinePatterns[u'quote'] = quote
110 md.inlinePatterns[u'quote'] = quote
General Comments 0
You need to be logged in to leave comments. Login now