Adds section title content to the "Search Inside" feature.
This was a little less straightforward than I'd assumed at first because a TextBlock and a section aren't the same kind of thing. Since the Section proxy class is DOA, this code only cares about ContentNodes with the right (usually null) resource type.
I assumed we'd want to group section results in with "Text Passages" so it looks like this (the first two results are sections):
I considered labelling the sections as such but it doesn't seem necessary. Clicking on the section title takes you to the section.
Also shortened this function mostly by making some function calls guaranteed to return empty string or empty list results so a number of if/else checks could be eliminated.
Fixes #1832
Adds section title content to the "Search Inside" feature.
This was a little less straightforward than I'd assumed at first because a
TextBlock
and a section aren't the same kind of thing. Since theSection
proxy class is DOA, this code only cares aboutContentNodes
with the right (usually null) resource type.I assumed we'd want to group section results in with "Text Passages" so it looks like this (the first two results are sections):
I considered labelling the sections as such but it doesn't seem necessary. Clicking on the section title takes you to the section.
Also shortened this function mostly by making some function calls guaranteed to return empty string or empty list results so a number of if/else checks could be eliminated.