Textmate:开始和结束捕获中的所有文本都不是 colored/matched

Textmate: All text within begin and end capture is not colored/matched

所以我可以 match/color {{#if media.isMobile}} 并且它是结束标记 {{/if}}。但是块之间的所有内容现在都只是普通文本(之前它有漂亮的 html 着色)。那么如何使用字典的顶层获取要捕获的捕获之间的内容(因为不在标签内的所有内容仍然具有正确的颜色)?

这是我的 if 语言模式代码,以备不时之需

<key>if_token</key>
    <dict>
        <key>begin</key>
        <string>(\{\{#)(if) (.+)(\}\})</string>
        <key>beginCaptures</key>
        <dict>
            <key>1</key>
            <dict>
                <key>name</key>
                <string>>punctuation.definition.tag.begin.html</string>
            </dict>
            <key>2</key>
            <dict>
                <key>name</key>
                <string>keyword.operator.handlebars</string>
            </dict>
            <key>3</key>
            <dict>
                <key>name</key>
                <string>variable.parameter.handlebars</string>
            </dict>
            <key>4</key>
            <dict>
                <key>name</key>
                <string>punctuation.definition.tag.end.html</string>
            </dict>
        </dict>
        <key>end</key>
        <string>(\{\{\/)(if)(}})</string>
        <key>endCaptures</key>
        <dict>
            <key>1</key>
            <dict>
                <key>name</key>
                <string>punctuation.definition.tag.begin.html</string>
            </dict>
            <key>2</key>
            <dict>
                <key>name</key>
                <string>keyword.operator.handlebars</string>
            </dict>
            <key>3</key>
            <dict>
                <key>name</key>
                <string>punctuation.definition.tag.end.html</string>
            </dict>               
        </dict>

    </dict>

想通了。而不是捕获整个块。捕获开始:{{#if .. 和结束:}} 作为一个模式。和 {{/if}} 一样。