1. overhacked
  2. pygments-main

Commits

Georg Brandl  committed 915fbcf

Avoid deepcopy.

  • Participants
  • Parent commits 4298dff
  • Branches default

Comments (0)

Files changed (1)

File pygments/lexers/web.py

View file
             (r"\*/", Comment, '#pop'),
         ],
     }
-    tokens.update(copy.deepcopy(common_sass_tokens))
+    for group, common in common_sass_tokens.iteritems():
+        tokens[group] = copy.copy(common)
     tokens['value'].append((r'\n', Text, 'root'))
     tokens['selector'].append((r'\n', Text, 'root'))
 
             (r"\*/", Comment, '#pop'),
         ],
     }
-    tokens.update(copy.deepcopy(common_sass_tokens))
+    for group, common in common_sass_tokens.iteritems():
+        tokens[group] = copy.copy(common)
     tokens['value'].extend([(r'\n', Text), (r'[;{}]', Punctuation, 'root')])
     tokens['selector'].extend([(r'\n', Text), (r'[;{}]', Punctuation, 'root')])