4 ms·
Could someone create a compatibility stylesheet that defines all the camelCased variables based on the new dashed values? Just as a stand-in until you can updat
by timdorr 14y ago
Could someone create a compatibility stylesheet that defines all the camelCased variables based on the new dashed values? Just as a stand-in until you can update all your variables.
That or can someone write up a nice Sed script to grep through my less files and change all the variable names?
- flaie 14y agoIt may be limited, but seems to be a good start: $ cat <<HN | sed -e '/@/ s/\([a-z]\)\([A-Z]\)/\1-\l\2/g' > The following sed will replace camelCase only if it can find an arobase > character in the current line, thus fooBar and bazThing won't be replaced > but @fooBar and @awesomeFooBarBazzProperty will. > True story. > HN The following sed will replace camelCase only if it can find an arobase character in the current line, thus fooBar and bazThing won't be replaced but @foo-bar and @awesome-foo-bar-bazz-property will. True story.