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

Conversation

ficristo
Copy link
Collaborator

@ficristo ficristo commented May 14, 2016

Add text/babel and text/jsx to the jsx mode.
My angular template (ng-template) weren't syntax hightlighted so I changed the mode.
I'm not sure is totally correct but seems to work ok.
This should fix #12208 too.

/cc @marcelgerber @petetnt

@petetnt
Copy link
Collaborator

petetnt commented May 14, 2016

Tested and the syntax highlighting LGTM.

Indentation is broken though (resets to 0 on every line) on the JSX mode, I think it might be an CodeMirror issue...

Should text/babel and text/jsx be added to

"script/type": { "attribOption": ["text/javascript", "text/ecmascript", "text/jscript", "text/livescript", "text/tcl", "text/x-javascript", "text/x-ecmascript",

and

"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"]

too so that they show up on <script type="..."> code hints too?

@ficristo
Copy link
Collaborator Author

I've added them.

@@ -66,7 +66,8 @@
"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"]
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: this should go in line 69.

@@ -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.

@MiguelCastillo MiguelCastillo merged commit 00517d0 into adobe:master May 15, 2016
@ficristo
Copy link
Collaborator Author

@MiguelCastillo Thank you.

@ficristo ficristo deleted the htmlmixed-modes branch May 15, 2016 13:10
@MiguelCastillo
Copy link
Contributor

You bet! Thank you for your PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syntax highlighting for babel (React)
3 participants