简体   繁体   中英

Embed one language in another in RubyMine?

I'm generating some JavaScript dynamically in Ruby. Is there a way to get RubyMine to recognize that this code is JavaScript for syntax highlighting, among other things? Funny that as I type this, I notice that Stack Overflow seems to get it.

  def script
    <<-EOS
      var blah = function() {
        alert('hello');
      }
    EOS
  end

您可以使用JS或JAVASCRIPT替换EOS,如果您启用了JavaScript插件,则应该选择它

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM