{
  "name": "Paperclip Template",
  "scopeName": "text.html.paperclip-html",
  "fileTypes": [],
  "uuid": "3e3ce414-c385-42ea-a2ba-451a37ca6fd1",
  "patterns": [
    {
      "include": "#topNodes"
    }
  ],
  "repository": {
    "topNodes": {
      "patterns": [
        {
          "include": "#slots"
        },
        {
          "include": "#nodes"
        }
      ]
    },
    "nodes": {
      "patterns": [
        {
          "include": "#elements"
        },
        {
          "include": "#blocks"
        },
        {
          "include": "#comments"
        },
        {
          "include": "#entities"
        }
      ]
    },
    "elements": {
      "patterns": [
        {
          "begin": "(<)(meta|import|input)",
          "beginCaptures": {
            "1": {
              "name": "punctuation.definition.tag.begin.html"
            },
            "2": {
              "name": "entity.name.tag.html"
            }
          },
          "patterns": [
            {
              "include": "#attribute"
            }
          ],
          "end": "(/?>)",
          "endCaptures": {
            "1": {
              "name": "punctuation.definition.tag.end.html"
            }
          }
        },
        {
          "begin": "(<)(style)([^>]*)(>)",
          "contentName": "source.pcss",
          "beginCaptures": {
            "1": {
              "name": "punctuation.definition.tag.begin.html"
            },
            "2": {
              "name": "entity.name.tag.html"
            },
            "3": {
              "patterns": [
                {
                  "include": "#attribute"
                }
              ]
            },
            "4": {
              "name": "punctuation.definition.tag.end.html"
            }
          },
          "end": "(</)(style)(?:\\s*)(>)",
          "endCaptures": {
            "1": {
              "name": "punctuation.definition.tag.end.html"
            },
            "2": {
              "name": "entity.name.tag.html"
            },
            "3": {
              "name": "punctuation.definition.tag.end.html"
            }
          },
          "patterns": [
            {
              "include": "source.pcss"
            }
          ]
        },
        {
          "match": "(<)([\\w\\-\\.]+)(>)",
          "captures": {
            "1": {
              "name": "punctuation.definition.tag.begin.html"
            },
            "2": {
              "name": "entity.name.tag.html"
            }
          }
        }
      ]
    },
    "attribute": {
      "patterns": [
        {
          "begin": "(?<=\\s)(component|export)(?=\\s)",
          "beginCaptures": {
            "1": {
              "name": "keyword.control"
            }
          },
          "end": "(?=\\s*+[^=\\s])"
        },
        {
          "begin": "\\s(as)(?=\\=)",
          "beginCaptures": {
            "1": {
              "name": "keyword.control"
            }
          },
          "end": "(?=\\s*+[^=\\s])",
          "patterns": [
            {
              "include": "#attributes-interior"
            }
          ]
        },
        {
          "begin": "([\\w\\$_\\-]+)",
          "beginCaptures": {
            "1": {
              "name": "entity.other.attribute-name.html"
            }
          },
          "end": "(?=\\s*+[^=\\s])",
          "patterns": [
            {
              "include": "#attributes-interior"
            }
          ]
        },
        {
          "include": "#slots"
        }
      ]
    },
    "attributes-interior": {
      "patterns": [
        {
          "begin": "(=)",
          "beginCaptures": {
            "1": {
              "name": "punctuation.separator.key-value.html"
            }
          },
          "end": "(?<=[^\\s=])(?!\\s*=)|(?=/?>)",
          "patterns": [
            {
              "include": "#dynamic-strings"
            },
            {
              "include": "#slots"
            }
          ]
        },
        {
          "include": "#slots"
        }
      ]
    },
    "comments": {
      "patterns": [
        {
          "name": "comment.block.html",
          "begin": "(<!--)",
          "beginCaptures": {
            "1": {
              "name": "punctuation.definition.comment.html"
            }
          },
          "end": "(-->)",
          "endCaptures": {
            "1": {
              "name": "punctuation.definition.comment.html"
            }
          }
        }
      ]
    },
    "slots": {
      "patterns": [
        {
          "begin": "({)",
          "beginCaptures": {
            "1": {
              "name": "punctuation.definition.tag.begin.html"
            }
          },
          "end": "(})",
          "endCaptures": {
            "1": {
              "name": "punctuation.definition.tag.end.html"
            }
          },
          "patterns": [
            {
              "include": "#operators"
            },
            {
              "include": "#nodes"
            },
            {
              "include": "#dynamic-strings"
            }
          ]
        }
      ]
    },
    "operators": {
      "patterns": [
        {
          "match": "(&&|!|\\|\\|)",
          "name": "keyword.control"
        }
      ]
    },
    "blocks": {
      "patterns": [
        {
          "begin": "({\\#)",
          "beginCaptures": {
            "1": {
              "name": "punctuation"
            }
          },
          "end": "(})",
          "endCaptures": {
            "1": {
              "name": "punctuation"
            }
          },
          "patterns": [
            {
              "include": "#block-interior"
            }
          ]
        },
        {
          "match": "({/})",
          "name": "punctuation"
        },
        {
          "begin": "(({/)(else)\\s)",
          "beginCaptures": {
            "2": {
              "name": "punctuation"
            },
            "3": {
              "name": "keyword.control"
            }
          },
          "end": "(})",
          "endCaptures": {
            "1": {
              "name": "punctuation"
            }
          },
          "patterns": [
            {
              "include": "#block-interior"
            }
          ]
        },
        {
          "name": "string.quoted.double",
          "match": "({/)(else)(})",
          "captures": {
            "1": {
              "name": "punctuation"
            },
            "2": {
              "name": "keyword.control"
            },
            "3": {
              "name": "punctuation"
            }
          }
        }
      ]
    },
    "block-interior": {
      "patterns": [
        {
          "name": "punctuation.definition.comment.html",
          "begin": "(if|each)",
          "beginCaptures": {
            "1": {
              "name": "keyword.control"
            }
          },
          "end": "(?=})",
          "patterns": [
            {
              "include": "source.js"
            }
          ]
        }
      ]
    },
    "dynamic-strings": {
      "patterns": [
        {
          "name": "string.quoted.double",
          "begin": "\"",
          "end": "\"",
          "beginCaptures": {
            "1": {
              "name": "punctuation.separator.key-value.html"
            }
          },
          "patterns": [
            {
              "include": "#class-pierce"
            },
            {
              "include": "#slots"
            }
          ]
        },
        {
          "name": "string.quoted.single",
          "begin": "'",
          "end": "'",
          "beginCaptures": {
            "1": {
              "name": "punctuation.separator.key-value.html"
            }
          },
          "patterns": [
            {
              "include": "#class-pierce"
            },
            {
              "include": "#slots"
            }
          ]
        }
      ]
    },
    "class-pierce": {
      "patterns": [
        {
          "match": "(>>>|\\$)([^\\s\"'>{]+)",
          "captures": {
            "0": {
              "name": "keyword.control"
            }
          }
        }
      ]
    },
    "strings": {
      "patterns": [
        {
          "name": "string.quoted.double",
          "begin": "\"",
          "end": "\""
        },
        {
          "name": "string.quoted.single",
          "begin": "'",
          "end": "'"
        }
      ]
    },
    "entities": {
      "patterns": [
        {
          "match": "(&)([^;]+?)(;)",
          "captures": {
            "1": {
              "name": "punctuation.definition.entity.html"
            },
            "2": {
              "name": "constant.character.entity.named.$2.html"
            },
            "3": {
              "name": "punctuation.definition.entity.html"
            }
          }
        }
      ]
    }
  }
}
