1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-14 19:07:41 +01:00

Removed unnecessary code from search plugin

This commit is contained in:
squidfunk 2023-01-08 09:40:01 +01:00
parent 81e7b8c7fc
commit 7484b19e9a
2 changed files with 6 additions and 2 deletions

View File

@ -401,8 +401,10 @@ class Parser(HTMLParser):
# Render opening tag if kept
if not self.skip.intersection(self.context):
if tag in self.keep:
# Check whether we're inside the section title
data = self.section.text
if self.section.el in reversed(self.context):
if self.section.el in self.context:
data = self.section.title
# Append to section title or text

View File

@ -401,8 +401,10 @@ class Parser(HTMLParser):
# Render opening tag if kept
if not self.skip.intersection(self.context):
if tag in self.keep:
# Check whether we're inside the section title
data = self.section.text
if self.section.el in reversed(self.context):
if self.section.el in self.context:
data = self.section.title
# Append to section title or text