Skip to content

Commit

Permalink
Fixed search plugin removing indentation for some code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Oct 2, 2023
1 parent 9ac03cf commit 8299f1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions material/plugins/search/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@ def handle_data(self, data):
elif data.isspace():
if not self.section.text or not self.section.text[-1].isspace():
self.section.text.append(data)
elif "pre" in self.context:
self.section.text.append(data)

# Handle everything else
else:
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/search/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@ def handle_data(self, data):
elif data.isspace():
if not self.section.text or not self.section.text[-1].isspace():
self.section.text.append(data)
elif "pre" in self.context:
self.section.text.append(data)

# Handle everything else
else:
Expand Down

0 comments on commit 8299f1d

Please sign in to comment.