@@ -34,6 +34,8 @@ define(function (require, exports, module) {
3434 XMLUtils = brackets . getModule ( "language/XMLUtils" ) ,
3535 StringMatch = brackets . getModule ( "utils/StringMatch" ) ,
3636 ExtensionUtils = brackets . getModule ( "utils/ExtensionUtils" ) ,
37+ ColorUtils = brackets . getModule ( "utils/ColorUtils" ) ,
38+ _ = brackets . getModule ( "thirdparty/lodash" ) ,
3739 SVGTags = require ( "text!SVGTags.json" ) ,
3840 SVGAttributes = require ( "text!SVGAttributes.json" ) ,
3941 cachedAttributes = { } ,
@@ -85,7 +87,7 @@ define(function (require, exports, module) {
8587 cachedAttributes [ tagName ] = cachedAttributes [ tagName ] . concat ( tagData . attributeGroups [ group ] ) ;
8688 }
8789 } ) ;
88- cachedAttributes [ tagName ] . sort ( ) ;
90+ cachedAttributes [ tagName ] = _ . uniq ( cachedAttributes [ tagName ] . sort ( ) , true ) ;
8991 }
9092 return cachedAttributes [ tagName ] ;
9193 }
@@ -96,7 +98,7 @@ define(function (require, exports, module) {
9698 *
9799 * @param {Array.<Object> } hints - the list of hints to format
98100 * @param {string } query - querystring used for highlighting matched
99- * poritions of each hint
101+ * portions of each hint
100102 * @return {Array.jQuery } sorted Array of jQuery DOM elements to insert
101103 */
102104 function formatHints ( hints , query ) {
@@ -206,6 +208,11 @@ define(function (require, exports, module) {
206208 } else if ( attributeData [ tagInfo . attrName ] ) {
207209 options = attributeData [ tagInfo . attrName ] . attribOptions ;
208210 isMultiple = attributeData [ tagInfo . attrName ] . multiple ;
211+
212+ if ( attributeData [ tagInfo . attrName ] . type === "color" ) {
213+ options = ColorUtils . COLOR_NAMES ;
214+ options = options . concat ( [ "currentColor" , "transparent" ] ) ;
215+ }
209216 }
210217
211218 // Stop if the attribute doesn't support multiple options.
0 commit comments