Skip to content

Instantly share code, notes, and snippets.

@DingWeizhe
Created June 17, 2016 02:49
Show Gist options
  • Select an option

  • Save DingWeizhe/9f5635d3ffcce8f7935c125c3e446eae to your computer and use it in GitHub Desktop.

Select an option

Save DingWeizhe/9f5635d3ffcce8f7935c125c3e446eae to your computer and use it in GitHub Desktop.
sublime plugin HTMLPrettify support blade tag
function style_html(html_source, options, js_beautify, css_beautify) {
+ html_source = html_source.replace(/\@([^\n\s]*)/ig, "<blade $1/>");
...
+ sweet_code = sweet_code.replace(/<blade ([^\n]*)\/>/ig, "@$1");
+ sweet_code = sweet_code.replace(/\(\ \'/ig, "('");
return sweet_code;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment