 - include: Packages/PHP/PHP Source.sublime-syntax#interpolations

  cdata-content:
    - meta_prepend: true
    - include: Packages/PHP/PHP Source.sublime-syntax#string-escapes
    - include: Packages/PHP/PHP Source.sublime-syntax#string-interpolations

  style-css-content:
    - meta_include_prototype: false
    - match: \s*((<!\[)(CDATA)(\[))
      captures:
        1: meta.tag.sgml.cdata.html
        2: punctuation.definition.tag.begin.html
        3: keyword.declaration.cdata.html
        4: punctuation.definition.tag.begin.html
      pop: 1  # make sure to match only once
      embed: scope:source.css.interpolated.php
      embed_scope: meta.tag.sgml.cdata.html source.css.embedded.html
      escape: \]\]>
      escape_captures:
        0: meta.tag.sgml.cdata.html punctuation.definition.tag.end.html
    - match: '{{style_content_begin}}'
      captures:
        1: comment.block.html punctuation.definition.comment.begin.html
      pop: 1  # make sure to match only once
      embed: scope:source.css.interpolated.php
      embed_scope: source.css.embedded.html
      escape: '{{style_content_end}}'
      escape_captures:
        1: source.css.embedded.html
        2: comment.block.html punctuation.definition.comment.end.html
        3: source.css.embedded.html
        4: comment.block.html punctuation.definition.comment.end.html

  script-javascript-content:
    - meta_include_prototype: false
    - match: \s*((<!\[)(CDATA)(\[))
      captures:
        1: meta.tag.sgml.cdata.html
        2: punctuation.definition.tag.begin.html
        3: keyword.declaration.cdata.html
        4: punctuation.definition.tag.begin.html
      pop: 1  # make sure to match only once
      embed: scope:source.js.interpolated.php
      embed_scope: meta.tag.sgml.cdata.html source.js.embedded.html
      escape: \]\]>
      escape_captures:
        0: meta.tag.sgml.cdata.html punctuation.definition.tag.end.html
    - match: '{{script_content_begin}}'
      captures:
        1: comment.block.html punctuation.definition.comment.begin.html
      pop: 1  # make sure to match only once
      embed: scope:source.js.interpolated.php
      embed_scope: source.js.embedded.html
      escape: '{{script_content_end}}'
      escape_captures:
        1: source.js.embedded.html
        2: comment.block.html punctuation.definition.comment.end.html
        3: source.js.embedded.html
        4: comment.block.html punctuation.definition.comment.end.html

  tag-event-attribute-value:
    - match: \"
      scope: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html
      embed: scope:source.js.interpolated.php
      embed_scope: meta.string.html meta.interpolation.html source.js.embedded.html
      escape: \"
      escape_captures:
        0: meta.string.html string.quoted.double.html punctuation.definition.string.end.html
    - match: \'
      scope: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html
      embed: scope:source.js.interpolated.php
      embed_scope: meta.string.html meta.interpolation.html source.js.embedded.html
      escape: \'
      escape_captures:
        0: meta.string.html string.quoted.single.html punctuation.definition.string.end.html
    - include: else-pop

  tag-style-attribute-value:
    - match: \"
      scope: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html
      embed: scope:source.css.interpolated.php#rule-list-body
      embed_scope: meta.string.html meta.interpolation.html source.css.embedded.html
      escape: \"
      escape_captures:
        0: meta.string.html string.quoted.double.html punctuation.definition.string.end.html
    - match: \'
      scope: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html
      embed: scope:source.css.interpolated.php#rule-list-body
      embed_scope: meta.string.html meta.interpolation.html source.css.embedded.html
      escape: \'
      escape_captures:
        0: meta.string.html string.quoted.single.html punctuation.definition.string.end.html
    - include: else-pop

  tag-attribute-value-content:
    - meta_prepend: true
    - include: Packages/PHP/PHP Source.sublime-syntax#string-escapes
    - include: Packages/PHP/PHP Source.sublime-syntax#string-interpolations

  strings-common-content:
    - meta_prepend: true
    - include: Packages/PHP/PHP Source.sublime-syntax#string-escapes
    - include: Packages/PHP/PHP Source.sublime-syntax#string-interpolations
PK