Commits

Yu-Jie Lin committed b2a8baa

update for smartypants >= 1.8.0

  • Participants
  • Parent commits dc7798d

Comments (0)

Files changed (2)

 Text             | None                                               | 2 / 3
 ***Others***
 lnkckr           | [lnkckr][]                                         | 2 / 3
-smartypants      | [smartypants][] >= 1.7.1                           | 2 / 3
+smartypants      | [smartypants][] >= 1.8.0                           | 2 / 3
 ***Tests***
 PEP8             |                                                    | 2 / 3
 Pyflakes         |                                                    | 2 / 3

bpy/handlers/base.py

 HAS_SMARTYPANTS = False
 try:
   import smartypants
-  from smartypants import smartyPants
   HAS_SMARTYPANTS = True
 except ImportError:
   pass
         warnings.warn("smartypants option is set, "
                       "but the library isn't installed.", RuntimeWarning)
         return html
-      RE = smartypants.tags_to_skip_regex
-      pattern = RE.pattern.replace('|code', '|code|tt')
-      pattern = pattern.replace('|script', '|script|style')
-      RE = re.compile(pattern, RE.flags)
-      smartypants.tags_to_skip_regex = RE
-      html = smartyPants(html, 'qbdew')
+      Attr = smartypants.Attr
+      html = smartypants.smartypants(html, Attr.set1 | Attr.w)
 
     return html