Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit cc63d99

Browse files
committed
Merge pull request #164 from adobe/randy/issue-163
Update for recent CodeMirror change for Sprint 36
2 parents b71d154 + 56bc1a6 commit cc63d99

4 files changed

Lines changed: 13 additions & 77 deletions

File tree

cssModeSupport.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,19 @@ define(function (require, exports, module) {
3535
}
3636

3737
function isFontNameToken(t) {
38-
return t.className === "variable-2" || t.className === "string-2";
38+
return t.className === "variable" || t.className === "variable-2" || t.className === "string-2";
3939
}
4040

4141
function isFontNameStringToken(t) {
4242
return t.className === "string";
4343
}
4444

4545
function inRuleBody(t) {
46-
var stateStack = t.state.stack || t.state.localState.stack;
46+
var context = t.state.context || t.state.localState.context;
4747

4848
return t.className !== "property" &&
4949
t.className !== "property error" &&
50-
stateStack.length > 0 &&
51-
stateStack[stateStack.length - 1] === "propertyValue";
50+
context.type === "prop";
5251
}
5352

5453
exports.isFontFamilyToken = isFontFamilyToken;

lessModeSupport.js

Lines changed: 0 additions & 61 deletions
This file was deleted.

main.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ define(function (require, exports, module) {
3232
var webfont = require("webfont"),
3333
FontParser = require("fontParser"),
3434
cssModeSupport = require("cssModeSupport"),
35-
lessModeSupport = require("lessModeSupport"),
3635
ewfBrowseDialogHtml = require("text!htmlContent/ewf-browse-dialog.html"),
3736
ewfIncludeDialogHtml = require("text!htmlContent/ewf-include-dialog.html"),
3837
ewfHowtoDialogHtml = require("text!htmlContent/ewf-howto-dialog.html"),
@@ -64,9 +63,8 @@ define(function (require, exports, module) {
6463
var PREFERENCES_CLIENT_ID = "com.adobe.edgewebfonts";
6564
var PREFERENCES_FONT_HISTORY_KEY = "ewf-font-history";
6665

67-
// Font parsers
68-
var cssParser = new FontParser(cssModeSupport),
69-
lessParser = new FontParser(lessModeSupport);
66+
// Font parser
67+
var cssParser = new FontParser(cssModeSupport);
7068

7169
// Local variables
7270
var lastFontSelected = null;
@@ -92,7 +90,7 @@ define(function (require, exports, module) {
9290
function _supportedLanguage(language) {
9391
var name = language.getName();
9492

95-
return (name === "CSS" || name === "LESS");
93+
return (name === "CSS" || name === "LESS" || name === "SCSS");
9694
}
9795

9896
function _supportedDocument(doc) {
@@ -109,9 +107,9 @@ define(function (require, exports, module) {
109107

110108
switch (name) {
111109
case "CSS":
112-
return cssParser;
113110
case "LESS":
114-
return lessParser;
111+
case "SCSS":
112+
return cssParser;
115113
default:
116114
throw new Error("Unsupported language: " + name);
117115
}
@@ -123,9 +121,9 @@ define(function (require, exports, module) {
123121

124122
switch (name) {
125123
case "CSS":
126-
return cssModeSupport;
127124
case "LESS":
128-
return lessModeSupport;
125+
case "SCSS":
126+
return cssModeSupport;
129127
default:
130128
throw new Error("Unsupported language: " + name);
131129
}
@@ -507,7 +505,7 @@ define(function (require, exports, module) {
507505

508506
// install autocomplete handler
509507
var fontHints = new FontHints();
510-
CodeHintManager.registerHintProvider(fontHints, ["css", "less"], 1);
508+
CodeHintManager.registerHintProvider(fontHints, ["css", "less", "scss"], 1);
511509

512510
// load blank font
513511
ExtensionUtils.loadStyleSheet(module, "styles/adobe-blank.css");

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "edge-code-web-fonts",
33
"title": "Adobe Edge Web Fonts",
44
"description": "Adobe Edge Web Fonts gives you access to a free, high-quality web font library made possible by contributions from Adobe, Google, and designers around the world. The fonts are served by Typekit, so you can be sure of high performance and stability.",
5-
"version": "0.1.2",
5+
"version": "0.1.3",
66
"keywords": [".css", ".html"],
77
"homepage": "http://html.adobe.com/edge/webfonts/",
88
"bugs": "https://github.com/adobe/brackets-edge-web-fonts/issues",
@@ -11,7 +11,7 @@
1111
"url" : "https://github.com/adobe/brackets-edge-web-fonts.git"
1212
},
1313
"engines": {
14-
"brackets": ">=0.30.0"
14+
"brackets": ">=0.36.0"
1515
},
1616
"keywords": [
1717
"css",

0 commit comments

Comments
 (0)