You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
855 B

7 months ago
  1. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  2. // Distributed under an MIT license: https://codemirror.net/5/LICENSE
  3. (function() {
  4. var mode = CodeMirror.getMode({indentUnit: 2}, "ruby");
  5. function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
  6. MT("divide_equal_operator",
  7. "[variable bar] [operator /=] [variable foo]");
  8. MT("divide_equal_operator_no_spacing",
  9. "[variable foo][operator /=][number 42]");
  10. MT("complex_regexp",
  11. "[keyword if] [variable cr] [operator =~] [string-2 /(?: \\( #{][tag RE_NOT][string-2 }\\( | #{][tag RE_NOT_PAR_OR][string-2 }* #{][tag RE_OPA_OR][string-2 } )/][variable x]")
  12. MT("indented_heredoc",
  13. "[keyword def] [def x]",
  14. " [variable y] [operator =] [string <<-FOO]",
  15. "[string bar]",
  16. "[string FOO]",
  17. "[keyword end]")
  18. })();