# SYNTAX TEST "Packages/Rails/HTML (Rails).sublime-syntax"
# <- text.html.rails

  <script> var i = 0; </script>
# ^^^^^^^^ meta.tag - source
#         ^^^^^^^^^^^^ source.js.embedded.html - meta.tag
#                     ^^^^^^^^^ meta.tag - source

  <script> var i = 0; --> </script>
# ^^^^^^^^ meta.tag - source
#         ^^^^^^^^^^^^ source.js.embedded.html - meta.tag
#                     ^^^^ - meta.tag - source
#                     ^^^ comment.block.html punctuation.definition.comment.end.html
#                         ^^^^^^^^^ meta.tag - source

  <script> <!-- var i = 0; </script>
# ^^^^^^^^ meta.tag - source
#         ^^^^^ - meta.tag - source
#              ^^^^^^^^^^^^ source.js.embedded.html - meta.tag
#                          ^^^^^^^^^ meta.tag - source
#          ^^^^ punctuation.definition.comment.begin.html

  <script> <!-- var i = 0; --> </script>
# ^^^^^^^^ meta.tag - source
#         ^^^^^ - meta.tag - source
#          ^^^^ punctuation.definition.comment.begin.html
#              ^^^^^^^^^^^^ source.js.embedded.html - meta.tag
#                          ^^^^ - meta.tag - source
#                          ^^^ comment.block.html punctuation.definition.comment.end.html
#                              ^^^^^^^^^ meta.tag - source

  <script>

# <- source.js.embedded.html
# ^^^^^^^^^^^^^ source.js.embedded.html
  </script>

  <script>
    <!--
#  ^^^^^ - meta.tag - source
#   ^^^^ comment.block.html punctuation.definition.comment.begin.html
#       ^ - comment - source
    var i = 0;
#  ^^^^^^^^^^^^ source.js.embedded.html - meta.tag
    -->
# ^^ - comment - source - meta.tag
#   ^^^^ - source - meta.tag
#   ^^^ comment.block.html punctuation.definition.comment.end.html
    var i = 0;
#  ^^^^^^^^^^^^ - source
  </script>
# ^^^^^^^^^ meta.tag - source

  <script type="application/ld+json">
      {
          <% key %>: <%.Site.Color%>,
      #  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.json.embedded.html
      #   ^^^^^^^^^ meta.mapping.json meta.embedded.rails
      #            ^^ meta.mapping.json - meta.embedded
      #              ^^^^^^^^^^^^^^^ meta.mapping.value.json meta.embedded.rails
      #                             ^ meta.mapping.json - meta.embedded

          "<% key %>": "<%.Site.Color%>",
      #  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.json.embedded.html
      #   ^ meta.mapping.key.json string.quoted.double.json punctuation.definition.string.begin.json
      #    ^^^^^^^^^ meta.mapping.key.json meta.embedded.rails - string
      #             ^ meta.mapping.key.json string.quoted.double.json punctuation.definition.string.end.json
      #              ^^ meta.mapping.json - meta.embedded
      #                ^ meta.mapping.value.json meta.string.json string.quoted.double.json punctuation.definition.string.begin.json
      #                 ^^^^^^^^^^^^^^^ meta.mapping.value.json meta.embedded.rails - string
      #                                ^ meta.mapping.value.json meta.string.json string.quoted.double.json punctuation.definition.string.end.json
      #                                 ^ meta.mapping.json - meta.embedded
      }
  </script>

  <p>Normal HTML</p>
# ^^^ meta.tag
# ^ punctuation.definition.tag.begin
#  ^ entity.name.tag
#   ^ punctuation.definition.tag.end

  <%# ruby comment %>
# ^^^^^^^^^^^^^^^^^^^ comment.block
# ^^^ punctuation.definition.comment.begin
#                  ^^ punctuation.definition.comment.end

  <% if true # comment inside embedded %>
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.rails
# ^^ punctuation.section.embedded.begin.rails
#   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ruby.rails.embedded.rails
#            ^ punctuation.definition.comment
#                                      ^^ punctuation.section.embedded.end.rails

    <p>Normal HTML</p>
#      ^ text.html.rails

  <% end %>
# ^^^^^^^^^ meta.embedded.rails
# ^^ punctuation.section.embedded.begin.rails
#   ^^^^^ source.ruby.rails.embedded.rails
#        ^^ punctuation.section.embedded.end.rails

  <% if false -%><p>inline erb</p><% end -%>
# ^^^^^^^^^^^^^^^ meta.embedded.rails
#                ^^^^^^^^^^^^^^^^^ - meta.embedded
#                                 ^^^^^^^^^^ meta.embedded.rails
# ^^ punctuation.section.embedded.begin.rails
#   ^^^^^^^^^^ source.ruby.rails.embedded.rails
#             ^^^ punctuation.section.embedded
#                                 ^^ punctuation.section.embedded.begin.rails
#                                   ^^^^^ source.ruby.rails.embedded.rails
#                                        ^^^ punctuation.section.embedded.end.rails

<p style="font-weight: <% if show_bold %>bold<% else %>normal<% end %>">
#        ^ meta.attribute-with-value.style.html meta.string.html - source
#         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html source.css.embedded.html
#                      ^^^^^^^^^^^^^^^^^^ meta.property-value.css meta.embedded.rails
#                                        ^^^^ meta.property-value.css - meta.embedded
#                                            ^^^^^^^^^^ meta.property-value.css meta.embedded.rails
#                                                      ^^^^^^ meta.property-value.css - meta.embedded
#                                                            ^^^^^^^^^ meta.property-value.css meta.embedded.rails
#                                                                     ^ meta.attribute-with-value.style.html meta.string.html - source
#        ^ string.quoted.double.html punctuation.definition.string.begin.html
#         ^^^^^^^^^^^ support.type.property-name
#                      ^^ punctuation.section.embedded.begin.rails
#                        ^^^^^^^^^^^^^^ source.ruby.rails.embedded.rails
#                         ^ keyword.control
#                                      ^^ punctuation.section.embedded.end.rails
#                                        ^^^^ support.constant
#                                            ^^ punctuation.section.embedded.begin.rails
#                                              ^^^^^^ source.ruby.rails.embedded.rails
#                                               ^ keyword.control
#                                                    ^^ punctuation.section.embedded.end.rails
#                                                      ^^^^^^ support.constant
#                                                            ^^ punctuation.section.embedded.begin.rails
#                                                              ^^^^^ source.ruby.rails.embedded.rails
#                                                               ^ keyword.control
#                                                                   ^^ punctuation.section.embedded.end.rails
#                                                                     ^ string.quoted.double.html punctuation.definition.string.end.html
#                                                                      ^ punctuation.definition.tag.end.html
</p>

<p attrib="No #{@ruby} interpolation">No #{@ruby} interpolation</p>
#         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.html string.quoted.double.html - meta.interpolation - source
#                                     ^^^^^^^^^^^^^^^^^^^^^^^^^ - meta.interpolation - source

<a onclick="run(<% @ruby %>, 'var<% @ruby %>e')" style="font: <% @ruby_font %>, 'font_<% @name %>';">text</a>
#          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.inline.any.html meta.attribute-with-value.event.html meta.string.html
#           ^^^^ - meta.embedded
#               ^^^^^^^^^^^ meta.embedded.rails
#                          ^^^^^^ - meta.interpolation meta.interpolation - meta.embedded
#                                ^^^^^^^^^^^ meta.string.js meta.interpolation.rails meta.embedded.rails
#                                           ^^^ - meta.embedded
#                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.inline.any.html meta.attribute-with-value.style.html meta.string.html
#                                                       ^^^^^^ - meta.embedded
#                                                             ^^^^^^^^^^^^^^^^ meta.embedded.rails
#                                                                             ^^^^^^^^ - meta.embedded
#                                                                                     ^^^^^^^^^^^ meta.string.css meta.interpolation.rails meta.embedded.rails
#                                                                                                ^^ - meta.embedded
#           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.js.embedded.html meta.function-call
#               ^^ punctuation.section.embedded.begin.rails
#                 ^^^^^^^ source.ruby.rails.embedded.rails
#                        ^^ punctuation.section.embedded.end.rails
#                            ^^^^ string.quoted.single.js
#                                ^^ punctuation.section.embedded.begin.rails
#                                ^^^^^^^^^^^ - string
#                                         ^^ punctuation.section.embedded.end.rails
#                                           ^^ string.quoted.single.js
#                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.css.embedded.html
#                                                             ^^ punctuation.section.embedded.begin.rails
#                                                               ^^^^^^^^^^^^ source.ruby.rails.embedded.rails
#                                                                           ^^ punctuation.section.embedded.end.rails
#                                                                               ^^^^^^ string.quoted.single.css
#                                                                                     ^^ punctuation.section.embedded.begin.rails
#                                                                                     ^^^^^^^^^^^ - string
#                                                                                              ^^ punctuation.section.embedded.end.rails
#                                                                                                ^ string.quoted.single.css
#                                                                                                 ^ punctuation.terminator.rule.css

<![CDATA[Text with <% @ruby %> interpolation.]]>
#        ^^^^^^^^^^ meta.tag.sgml.cdata.html meta.string.html string.unquoted.cdata.html
#                  ^^^^^^^^^^^ meta.tag.sgml.cdata.html meta.string.html meta.interpolation.rails meta.embedded.rails - string
#                             ^^^^^^^^^^^^^^^ meta.tag.sgml.cdata.html meta.string.html string.unquoted.cdata.html

  <my-<%=$tag%> <%=$attr%>=<%=$value%>/>
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.other.html
# ^ meta.tag.other.html punctuation.definition.tag.begin.html
#  ^^^ entity.name.tag.other.html - meta.interpolation
#     ^^^^^^^^^ entity.name.tag.other.html meta.embedded.rails
#     ^^^ punctuation.section.embedded.begin.rails
#        ^^^^ variable.other.readwrite.global.ruby
#            ^^ punctuation.section.embedded.end.rails
#               ^^^^^^^^^^ meta.attribute-with-value.html entity.other.attribute-name.html meta.embedded.rails
#               ^^^ punctuation.section.embedded.begin.rails
#                  ^^^^^ variable.other.readwrite.global.ruby
#                       ^^ punctuation.section.embedded.end.rails
#                         ^ meta.attribute-with-value.html punctuation.separator.key-value.html
#                          ^^^^^^^^^^^ meta.attribute-with-value.html meta.string.html meta.embedded.rails
#                          ^^^ punctuation.section.embedded.begin.rails
#                             ^^^^^^ variable.other.readwrite.global.ruby
#                                   ^^ punctuation.section.embedded.end.rails
#                                     ^^ punctuation.definition.tag.end.html

  <<%=$tag%> <%=$attr%>=<%=$value%>/>
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.other.html
# ^ meta.tag.other.html punctuation.definition.tag.begin.html
#  ^^^^^^^^ entity.name.tag.other.html meta.embedded.rails
#  ^^^ punctuation.section.embedded.begin.rails
#     ^^^^ variable.other.readwrite.global.ruby
#         ^^ punctuation.section.embedded.end.rails
#            ^^^^^^^^^^ meta.attribute-with-value.html entity.other.attribute-name.html meta.embedded.rails
#            ^^^ punctuation.section.embedded.begin.rails
#               ^^^^^ variable.other.readwrite.global.ruby
#                    ^^ punctuation.section.embedded.end.rails
#                      ^ meta.attribute-with-value.html punctuation.separator.key-value.html
#                       ^^^^^^^^^^^ meta.attribute-with-value.html meta.string.html meta.embedded.rails
#                       ^^^ punctuation.section.embedded.begin.rails
#                          ^^^^^^ variable.other.readwrite.global.ruby
#                                ^^ punctuation.section.embedded.end.rails
#                                  ^^ punctuation.definition.tag.end.html
