         end:   "(</)(CsInstruments)(>)"
         beginCaptures:
           1: name: "punctuation.definition.tag.begin.csound-document"
-          2: name: "entity.name.tag.begin.csound-document"
-          3: name: "punctuation.definition.tag.begin.csound-document"
+          2: name: "entity.name.tag.csound-document"
+          3: name: "punctuation.definition.tag.end.csound-document"
         endCaptures:
-          1: name: "punctuation.definition.tag.end.csound-document"
-          2: name: "entity.name.tag.end.csound-document"
+          1: name: "punctuation.definition.tag.begin.csound-document"
+          2: name: "entity.name.tag.csound-document"
           3: name: "punctuation.definition.tag.end.csound-document"
         contentName: "source.csound.embedded.csound-document"
         patterns: [include: "source.csound"]

        end:   "(</)(CsScore)(>)"
        beginCaptures:
          1: name: "punctuation.definition.tag.begin.csound-document"
          2: name: "entity.name.tag.begin.csound-document"
          3: name: "punctuation.definition.tag.begin.csound-document"
        endCaptures:
          1: name: "punctuation.definition.tag.end.csound-document"
          2: name: "entity.name.tag.end.csound-document"
          3: name: "punctuation.definition.tag.end.csound-document"
        contentName: "source.csound-score.embedded.csound-document"
        patterns: [include: "source.csound-score"]
      },{
        name:  "meta.html.csound-document"
        begin: "(?=<[hH][tT][mM][lL])"
        end:   "(?<=</[hH][tT][mM][lL]>)"
        patterns: [include: "text.html.basic"]
      }
      {include: "#tags"}

  tags:
    patterns: [
      {
        begin: "(</?)([\\w:-]+)"
        end:   ">"
        beginCaptures:
          1: name: "punctuation.definition.tag.begin.csound-document"
          2: name: "entity.name.tag.csound-document"
        endCaptures:
          0: name: "punctuation.definition.tag.end.csound-document"
        patterns: [include: "text.xml#tagStuff"]
      }
    ]
