Fix regressions in the display of literals and keywords in code hints.

1. keywords should be monospace.
2. literals should be dark grey.
This commit is contained in:
dloverin committed 2013-04-19 09:40:47 -04:00
1 parent 84ec53ac59
commit cb96db453c
3 files changed
+14 -1

No files matched your search

@@ -177,7 +177,7 @@ define(function (require, exports, module) {
KEYWORDS = annotateKeywords(KEYWORD_TOKENS);
var LITERAL_NAMES = [
"true", "false", "null", "undefined"
"true", "false", "null"
],
LITERAL_TOKENS = LITERAL_NAMES.map(function (t) {
return makeToken(t, []);
@@ -337,6 +337,15 @@ define(function (require, exports, module) {
if (searchResult) {
searchResult.value = hint.value;
searchResult.guess = hint.guess;
if (hint.keyword !== undefined) {
searchResult.keyword = hint.keyword;
}
if (hint.literal !== undefined) {
searchResult.literal = hint.literal;
}
if (hint.depth !== undefined) {
searchResult.depth = hint.depth;
}
@@ -107,6 +107,10 @@ define(function (require, exports, module) {
if (token.keyword) {
$hintObj.addClass("keyword-hint");
}
if (token.literal) {
$hintObj.addClass("literal-hint");
}
// highlight the matched portion of each hint
if (token.stringRanges) {