Template-scopes not working in subsyntaxes

Hi there! I was trying to polish the syntax declaration for the Vue extension and I encountered a possible bug with template-scopes.

The syntax is composed by a main one which defines all the template, script and style blocks and a subsyntax (VueHTML) for all the special Vue directives used in the template. I was looking at using the template-scopes for extending the base HTML with these directives but I found out that since VueHTML is used as a subsyntax the template-scopes aren’t applied.

When I use the subsyntax as a “main” syntax everything works fine.

When I use it in the actual main syntax it doesn’t work.

The declaration of the template block:

<scope name="vue.tag.open.paired.template" spell-check="false" lookup="documentation">
				<starts-with>
					<expression>(?=&lt;(?i:template)\b)(?![^\/&gt;]*\/&gt;\\s*$)</expression>
				</starts-with>
				<ends-with />
				<subscopes anchored="true" skip-whitespace="false">
					<scope name="vue.tag.template.open">
						<symbol type="tag-style">
							<context behavior="start" group-by-name="true">
								<auto-close string="&lt;/" completion="${name}&gt;" />
							</context>
						</symbol>
						<starts-with>
							<expression>&lt;((?i:template))</expression>
							<capture number="1" name="vue.tag.name" />
						</starts-with>
						<ends-with>
							<expression>/?&gt;</expression>
						</ends-with>
						<subscopes>
							<include syntax="vue-html" collection="vue-directives" />
							<include syntax="html" collection="attributes" />
						</subscopes>
					</scope>
					<scope name="vue.embedded.block.template.content">
						<starts-with>
							<expression>(?&lt;=&gt;)</expression>
						</starts-with>
						<ends-with>
							<expression>^(?=&lt;/(?i:template)\b)</expression>
						</ends-with>
						
						<subsyntax name="vue-html" noncontiguous="true" export-symbols="true">
							<cut-off>
								<expression>^(?=&lt;/(?i:template)\b)</expression>
							</cut-off>
						</subsyntax>
					</scope>
				</subscopes>
			</scope>

Is this an inteded behaviour? What can I do about it? Right now to achieve this result I basically have to redeclare the entire HTML syntax… Not the best.

Thanks

Not really able to help, but I’ve found similar issues with my Pug plugin. It would make for some very long, duplicative work at the top-level to make it work, which sub-syntaxes would seem to be meant to avoid.