Auto merge of #6645 - camsteffen:syntax-highlighting, r=phansch
Fix website syntax highlighting changelog: none Fix syntax highlighting on website when the docs contain ` ```rust,ignore`
This commit is contained in:
commit
5db215bca8
@ -22,7 +22,10 @@ def parse_code_block(match):
|
|||||||
lines = []
|
lines = []
|
||||||
|
|
||||||
for line in match.group(0).split('\n'):
|
for line in match.group(0).split('\n'):
|
||||||
if not line.startswith('# '):
|
# fix syntax highlighting for headers like ```rust,ignore
|
||||||
|
if line.startswith('```rust'):
|
||||||
|
lines.append('```rust')
|
||||||
|
elif not line.startswith('# '):
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
|
|
||||||
return '\n'.join(lines)
|
return '\n'.join(lines)
|
||||||
|
Loading…
Reference in New Issue
Block a user