Skip to content

Commit 7484b19

Browse files
committed
Removed unnecessary code from search plugin
1 parent 81e7b8c commit 7484b19

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

material/plugins/search/plugin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,10 @@ def handle_starttag(self, tag, attrs):
401401
# Render opening tag if kept
402402
if not self.skip.intersection(self.context):
403403
if tag in self.keep:
404+
405+
# Check whether we're inside the section title
404406
data = self.section.text
405-
if self.section.el in reversed(self.context):
407+
if self.section.el in self.context:
406408
data = self.section.title
407409

408410
# Append to section title or text

src/plugins/search/plugin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,10 @@ def handle_starttag(self, tag, attrs):
401401
# Render opening tag if kept
402402
if not self.skip.intersection(self.context):
403403
if tag in self.keep:
404+
405+
# Check whether we're inside the section title
404406
data = self.section.text
405-
if self.section.el in reversed(self.context):
407+
if self.section.el in self.context:
406408
data = self.section.title
407409

408410
# Append to section title or text

0 commit comments

Comments
 (0)