diff options
| author | bors <bors@rust-lang.org> | 2021-01-27 06:47:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-01-27 06:47:07 +0000 |
| commit | 5db215bca8baa05520002e553e2a7b2d9659b6ba (patch) | |
| tree | 1066e22f87bc920da9fd90d2c2314bead5cf0726 | |
| parent | be0125bed4fe4ca1fd69870db36062a6aa5a5b5f (diff) | |
| parent | cbf9d492b9a60c7267907731941d14ec96510681 (diff) | |
| download | rust-5db215bca8baa05520002e553e2a7b2d9659b6ba.tar.gz rust-5db215bca8baa05520002e553e2a7b2d9659b6ba.zip | |
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`
| -rwxr-xr-x | util/export.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/export.py b/util/export.py index 5d1bd60acf3..1248e6b6a26 100755 --- a/util/export.py +++ b/util/export.py @@ -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) |
