Browse Source

Small tweak in shortcut function

Ralfp 12 years ago
parent
commit
97a786f2a8
1 changed files with 3 additions and 2 deletions
  1. 3 2
      misago/markdown/factory.py

+ 3 - 2
misago/markdown/factory.py

@@ -21,14 +21,15 @@ class ClearHTMLParser(HTMLParser):
                 self.lookback.pop()
                 self.lookback.pop()
         except IndexError:
         except IndexError:
             pass
             pass
-
         
         
     def handle_data(self, data):
     def handle_data(self, data):
         # String does not repeat itself
         # String does not repeat itself
         if self.clean_text[-len(data):] != data:
         if self.clean_text[-len(data):] != data:
             # String is not "QUOTE"
             # String is not "QUOTE"
             try:
             try:
-                if not (data == 'Quote' and self.lookback[-1] == 'h3' and self.lookback[-2] == 'blockquote'):
+                if self.lookback[-1] in ('strong', 'em'):
+                    self.clean_text += data
+                elif not (data == 'Quote' and self.lookback[-1] == 'h3' and self.lookback[-2] == 'blockquote'):
                     self.clean_text += ' %s' % data
                     self.clean_text += ' %s' % data
             except IndexError:
             except IndexError:
                 self.clean_text += ' %s' % data
                 self.clean_text += ' %s' % data