mirror of
https://github.com/Hopiu/lychee.git
synced 2026-05-21 03:51:52 +00:00
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:
parent
40bef97466
commit
ffb57fa202
2 changed files with 3 additions and 3 deletions
|
|
@ -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>...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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..]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue