mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-16 17:58:14 +00:00
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
1 changed files with 4 additions and 1 deletions
|
@ -22,7 +22,10 @@ def parse_code_block(match):
|
|||
lines = []
|
||||
|
||||
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)
|
||||
|
||||
return '\n'.join(lines)
|
||||
|
|
Loading…
Reference in a new issue