Fix syntax highlighting in README (#792)

The help message was highlighted as if it was a gitignore file.
Let's disable this spurious syntax highlighting.
This commit is contained in:
Jakub Wilk 2022-10-24 15:59:04 +02:00 committed by GitHub
parent 40bef97466
commit ffb57fa202
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -207,7 +207,7 @@ token with no extra permissions is enough to be able to check public repos links
There is an extensive list of commandline parameters to customize the behavior.
See below for a full list.
```ignore
```text
USAGE:
lychee [OPTIONS] <inputs>...

View file

@ -44,13 +44,13 @@ mod readme {
.expect("Invalid utf8 output for `--help`");
let readme = load_readme_text();
const BACKTICKS_OFFSET: usize = 9; // marker: ```ignore
const BACKTICKS_OFFSET: usize = 7; // marker: ```text
const NEWLINE_OFFSET: usize = 1;
let usage_start = BACKTICKS_OFFSET
+ NEWLINE_OFFSET
+ readme
.find("```ignore\nUSAGE:\n")
.find("```text\nUSAGE:\n")
.expect("Couldn't find USAGE section in README.md");
let usage_end = readme[usage_start..]