I'm trying to write a language injection for PyCharm that will recognize anything within a <style type="text/x-scss"></style>
tag as SCSS. Through some inspection of IntelliJ and the PSI documentation, and direct editing of the IntelliLang.xml file, this is the closest I've gotten:
+ xmlTag().withChild(xmlAttribute().withLocalName(string().equalTo("type")).withValue(string().equalTo("text/x-scss"))).withNamespace(string().equalTo("http://www.w3.org/1999/xhtml"))
However, this (a) seems not to do anything, and (b) as soon as I close the Language Injections Pane, PyCharm rewrites the Java as xmlTag().withLocalName(string().matches("<none>"))
. What's the right way to do this and to get it to save?