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. There is an extensive list of commandline parameters to customize the behavior.
See below for a full list. See below for a full list.
```ignore ```text
USAGE: USAGE:
lychee [OPTIONS] <inputs>... lychee [OPTIONS] <inputs>...

View file

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