1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-12-18 02:15:56 +01:00

Fixed search plugin removing indentation for some code blocks

This commit is contained in:
squidfunk 2023-10-02 10:54:59 +02:00
parent 9ac03cf806
commit 8299f1d3a0
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
2 changed files with 4 additions and 0 deletions

View File

@ -545,6 +545,8 @@ class Parser(HTMLParser):
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:

View File

@ -545,6 +545,8 @@ class Parser(HTMLParser):
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: