Skip to content

I20230413-0240

@jonahgraham jonahgraham tagged this 12 Apr 08:29
In the case that two content types match a given input, the depth
was being used to select between them. This was done top make sure
more specific types for related types were selected as appropriate.

The way content types are selected is by first sorting all the
candidate types, and then choosing the first one.

This change makes the sort only consider the depth of the content
type if the content types have a descendent-ancestor relationship.
If they are not in the same lineage, the depth is not a criteria
for sorting the content types.

New content type tests have been added to cover the case from #351,
specifically, conflict4 matches the conflict for *.hpp files between
the tm4e and cdt plug-ins.

The comment update on conflict2 test and the new conflict2a test
should probably have been done when Bug 86915 was completed because
in 9cbda7e4a42e2fd94e50d8fe700c0ad1574fb5a9 the order of content types
was changed, but the comment was not changed, and it wasn't apparent
to me if there was an explicit test that covered the conflict case
of described content types.

Fixes #151
Assets 2
Loading