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:
parent
9ac03cf806
commit
8299f1d3a0
@ -545,6 +545,8 @@ class Parser(HTMLParser):
|
|||||||
elif data.isspace():
|
elif data.isspace():
|
||||||
if not self.section.text or not self.section.text[-1].isspace():
|
if not self.section.text or not self.section.text[-1].isspace():
|
||||||
self.section.text.append(data)
|
self.section.text.append(data)
|
||||||
|
elif "pre" in self.context:
|
||||||
|
self.section.text.append(data)
|
||||||
|
|
||||||
# Handle everything else
|
# Handle everything else
|
||||||
else:
|
else:
|
||||||
|
@ -545,6 +545,8 @@ class Parser(HTMLParser):
|
|||||||
elif data.isspace():
|
elif data.isspace():
|
||||||
if not self.section.text or not self.section.text[-1].isspace():
|
if not self.section.text or not self.section.text[-1].isspace():
|
||||||
self.section.text.append(data)
|
self.section.text.append(data)
|
||||||
|
elif "pre" in self.context:
|
||||||
|
self.section.text.append(data)
|
||||||
|
|
||||||
# Handle everything else
|
# Handle everything else
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user