-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS classes with dash are not renamed #6
Comments
You can fix this issue by modifying line 272-273 to:
All I've done is add [\w-] instead of \w - allowing for the dash in class or id name. |
Not sure it's related to Python 2.7 or my Mac OSX Yosemite but this snippet does not works. I've got the following error : searching for classes and ids...
mapping classes and ids to new names...
Traceback (most recent call last):
File "/usr/local/bin/munch", line 5, in <module>
pkg_resources.run_script('htmlmuncher==1.0', 'munch')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 492, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1357, in run_script
exec_(script_code, namespace, namespace)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 47, in exec_
exec("""exec code in globs, locs""")
File "<string>", line 1, in <module>
File "/Library/Python/2.7/site-packages/htmlmuncher-1.0-py2.7.egg/EGG-INFO/scripts/munch", line 24, in <module>
File "build/bdist.macosx-10.10-intel/egg/muncher/muncher.py", line 104, in run
File "build/bdist.macosx-10.10-intel/egg/muncher/muncher.py", line 395, in processMaps
File "build/bdist.macosx-10.10-intel/egg/muncher/varfactory.py", line 35, in getNext
File "build/bdist.macosx-10.10-intel/egg/muncher/varfactory.py", line 75, in getSmallName
Exception: until my math skillz get better we can only support 702 possibilities! |
@calummoore Thanks so much! For those using that trick, you can't run the binary package anymore (unless you know how to create an So you can't do:
But you have to run your own local munch version:
|
Happened to me as well after fixing the missing dash-support with the lines above in my muncher.py file. |
The following will not be re-named because there is a dash between 'btn' and 'default'
The text was updated successfully, but these errors were encountered: