Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
// stolen from http://api.jquery.com/map/ | |
// usage: $('div').equalizeHeights(); | |
$.fn.equalizeHeights = function(){ | |
return this.height( Math.max.apply( this, $(this).map(function(i,e){ return $(e).height() }).get() ) ); | |
} |
import sublime | |
import sublime_plugin | |
import re | |
class CompactExpandCssCommand(sublime_plugin.TextCommand): | |
def run(self, edit, action='compact'): | |
rule_starts = self.view.find_all('\{') | |
rule_ends = self.view.find_all('\}') |
<string>(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)</string> | |
=> | |
<string>(?:^\s+)?(<)((?i:script))\b(?!([^>]*text/template[^>]*|[^>]*/>))</string> |