Open Turbo87 opened 6 years ago
@denofevil sent me the following instructions via email:
According to the HTML spec (https://www.w3.org/TR/html52/syntax.html#tokenizer-tag-open-state) that is not a valid tag name. Due to this I’d rather avoid adding this change to the HTML lexer.
What I’d suggest instead is to make a copy of https://github.com/JetBrains/intellij-community/blob/master/xml/xml-psi-impl/src/com/intellij/lexer/_HtmlLexer.flex with required edits, making a new language with its own parser definition (e.g. https://github.com/JetBrains/intellij-plugins/blob/master/vuejs/src/org/jetbrains/vuejs/VueLanguage.kt & https://github.com/JetBrains/intellij-plugins/blob/master/vuejs/src/org/jetbrains/vuejs/language/VueParserDefinition.kt#L34 & https://github.com/JetBrains/intellij-plugins/blob/master/vuejs/src/org/jetbrains/vuejs/language/VueSyntaxHighlighterFactory.kt#L15). You can then substitute HTML for this language via LanguageSubstitutor (https://github.com/JetBrains/intellij-plugins/blob/master/handlebars/src/com/dmarcotte/handlebars/file/HbLanguageSubstitutor.java) for Ember projects
Right now the HTML parser in IntelliJ will throw up on HTML elements starting with
@
, but the following will soon be possible in Ember.js: