def _get_section(self, soup, title_text):
"""
Given some HTML soup and the text of a title within it,
get the content between that title and the next title
of the same level, and return it as another soup object.
E.g. if `soup` contains is:
<p>Pre</p>
<h2>My heading</h2>
<p>Content</p>
<h2>Next heading</h2>
and `title_text` is "My heading", then it will return:
<p>Content</p>
"""
heading = soup.find(HEADER_REGEX, string=title_text)
This is used to find a section, by looking for a header, e.g. "Navigation"
the soup.find(HEADER_REGEX, string=title_text) will find something for e.g. <h2>Navigation</h2> but in 2.8.14, Discourse now renders
This is used to find a section, by looking for a header, e.g. "Navigation"
the
soup.find(HEADER_REGEX, string=title_text)
will find something for e.g.<h2>Navigation</h2>
but in 2.8.14, Discourse now rendersnote the extra
<a/>