Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.99 KB | None | 0 0
  1. diff --git a/r2/r2/lib/contrib/markdown.py b/r2/r2/lib/contrib/markdown.py
  2. index 854ff01..2d344f0 100644
  3. --- a/r2/r2/lib/contrib/markdown.py
  4. +++ b/r2/r2/lib/contrib/markdown.py
  5. @@ -201,6 +201,7 @@ class _Markdown:
  6.          text = self._DoAutoLinks(text)
  7.          text = self._EncodeAmpsAndAngles(text)
  8.          text = self._DoItalicsAndBold(text)
  9. +        text = self._DoBlink(text)
  10.          text = self.r_NewLine.sub(" <br%s\n" % self.emptyelt, text)
  11.          return text
  12.  
  13. @@ -530,6 +531,11 @@ class _Markdown:
  14.          text = self.r_DoItalics.sub(r"<em>\2</em>", text)
  15.          return text
  16.      
  17. +    r_DoBlink = re.compile(r"(\||_) (?=\S) (.+?) (?<=\S) ", re.VERBOSE | re.S)
  18. +    def _DoBlink(self, text):
  19. +        text = self.r_DoBlink.sub(r'<span style="text-decoration: blink;">\2</span>', text)
  20. +        return text
  21. +    
  22.      r_start = re.compile(r"^", re.M)
  23.      ####r_DoBlockQuotes1 = re.compile(r"^[ \t]*>[ \t]?", re.M)
  24.      r_DoBlockQuotes1 = re.compile(r"^[ \t]*>[ \t]?", re.M)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement