Permalink
Browse files

Toggle Comment action now detects CSS dialects

  • Loading branch information...
1 parent 675bc0f commit c6864f9fc78efa4909faed29a53ce07b10e2f4c6 @sergeche sergeche committed May 10, 2013
Showing with 8 additions and 1 deletion.
  1. +3 −0 build.xml
  2. +5 −1 javascript/actions/toggleComment.js
View
@@ -285,6 +285,9 @@
<filelist dir="${emmet_build_dir}">
<file name="emmet.js"/>
</filelist>
+ <filelist dir="${emmet_javascript}/loaders">
+ <file name="bootstrap.js"/>
+ </filelist>
<filelist dir="${emmet_javascript}/actions">
<file name="selectLine.js"/>
</filelist>
@@ -9,6 +9,8 @@
* @constructor
*/
emmet.exec(function(require, _) {
+ var prefs = require('preferences');
+
/**
* Toggle HTML comment on current selection or tag
* @param {IEmmetEditor} editor
@@ -202,8 +204,10 @@ emmet.exec(function(require, _) {
}
}
- if (info.syntax == 'css')
+ var cssSyntaxes = prefs.getArray('css.syntaxes');
+ if (_.include(cssSyntaxes, info.syntax)) {
return toggleCSSComment(editor);
+ }
return toggleHTMLComment(editor);
});

0 comments on commit c6864f9

Please sign in to comment.