Commits

hizel committed 8b99a76

fix [[/tag]

  • Participants
  • Parent commits 136d5cb

Comments (0)

Files changed (2)

File cciw/cciwmain/templatetags/bbcode.py

                         if wholematch.startswith('[['):
                             # in case of "[[tag]blah":
                             self.push_text_node('[')
-                        if wholematch.startswith('[/'):
+                        if wholematch.startswith('[/') or
+                            wholematch.startswith('[[/'):
                             # closing
                             self.close_tag_node(tagname)
                         else:

File cciw/cciwmain/tests/bbcode.py

     # empty string should return nothing
     ('',
         ''),
+    # [[/tag] test
+    ('[quote]Apple][[/quote]after tag',
+            '<blockquote><div>Apple][</div></blockquote><div>after tag</div>'),
     # Bible:
     ('[bible]test',
         '<blockquote class="bible"><div>test</div></blockquote>'),