Show More
@@ -62,7 +62,7 b" DIFF_TYPE_JSON = 'json'" | |||
|
62 | 62 | |
|
63 | 63 | PREPARSE_PATTERNS = { |
|
64 | 64 | r'>>(\d+)': r'[post]\1[/post]', # Reflink ">>123" |
|
65 |
r'^ |
|
|
65 | r'^>([^>].+)': r'[quote]\1[/quote]', # Quote ">text" | |
|
66 | 66 | r'^//(.+)': r'[comment]\1[/comment]', # Comment "//text" |
|
67 | 67 | } |
|
68 | 68 |
@@ -16,4 +16,12 b' class ParserTest(TestCase):' | |||
|
16 | 16 | preparsed_text = Post.objects._preparse_text(raw_text) |
|
17 | 17 | |
|
18 | 18 | self.assertEqual('[comment]comment[/comment]', preparsed_text, |
|
19 | 'Comment not preparsed.') | |
|
19 | 'Comment not preparsed.') | |
|
20 | ||
|
21 | def test_preparse_reflink(self): | |
|
22 | raw_text = '>>12\nText' | |
|
23 | preparsed_text = Post.objects._preparse_text(raw_text) | |
|
24 | ||
|
25 | self.assertEqual('[post]12[/post]\nText', | |
|
26 | preparsed_text, 'Reflink not preparsed.') | |
|
27 |
General Comments 0
You need to be logged in to leave comments.
Login now