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

Fixed htmlmixed highlighting. #12422

Merged
merged 1 commit into from
May 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/extensions/default/HTMLCodeHints/HtmlAttributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@
"menu/type": { "attribOption": ["context", "list", "toolbar"] },
"ol/type": { "attribOption": ["1", "a", "A", "i", "I"] },
"script/type": { "attribOption": ["text/javascript", "text/ecmascript", "text/jscript", "text/livescript", "text/tcl", "text/x-javascript", "text/x-ecmascript",
"application/x-javascript", "application/x-ecmascript", "application/javascript", "application/ecmascript"] },
"application/x-javascript", "application/x-ecmascript", "application/javascript", "application/ecmascript",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one also has the somewhat arbitrary new lines. But these were here before. No need to fix.

"text/babel", "text/jsx"] },
"style/type": { "attribOption": ["text/css"] },
"input/type": { "attribOption": ["button", "checkbox", "color", "date", "datetime", "datetime-local", "email", "file", "hidden", "image", "month",
"number", "password", "radio", "range", "reset", "search", "submit", "tel", "text", "time", "url", "week"] },
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/default/SVGCodeHints/SVGAttributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"attribOptions": ["auto", "inherit", "optimizeQuality", "optimizeSpeed"]
},
"contentScriptType": {
"attribOptions": ["application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ecmascript", "text/javascript", "text/jscript", "text/livescript", "text/tcl", "text/x-ecmascript", "text/x-javascript"]
"attribOptions": ["application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ecmascript", "text/javascript", "text/jscript", "text/livescript", "text/tcl", "text/x-ecmascript", "text/x-javascript", "text/babel", "text/jsx"]
},
"contentStyleType": {
"attribOptions": ["text/css"]
Expand Down Expand Up @@ -285,7 +285,7 @@
"attribOptions": ["always", "never", "whenNotActive"]
},
"script/type": {
"attribOptions": ["application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ecmascript", "text/javascript", "text/jscript", "text/livescript", "text/tcl", "text/x-ecmascript", "text/x-javascript"]
"attribOptions": ["application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ecmascript", "text/javascript", "text/jscript", "text/livescript", "text/tcl", "text/x-ecmascript", "text/x-javascript", "text/babel", "text/jsx"]
},
"set/fill": {
"attribOptions": ["freeze", "remove"]
Expand Down
12 changes: 10 additions & 2 deletions src/language/LanguageManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1101,8 +1101,16 @@ define(function (require, exports, module) {
// far were strings, so we spare us the trouble of allowing more complex mode values.
CodeMirror.defineMIME("text/x-brackets-html", {
"name": "htmlmixed",
"scriptTypes": [{"matches": /\/x-handlebars|\/x-mustache|\/ng-template$|^text\/html$/i,
"mode": null}]
"scriptTypes": [
{
"matches": /\/x-handlebars|\/x-mustache|\/ng-template$|^text\/html$/i,
"mode": "htmlmixed"
},
{
"matches": /^text\/(babel|jsx)$/i,
"mode": "jsx"
}
]
});

// Define SVG MIME type so an SVG language can be defined for SVG-specific code hints.
Expand Down