From ffb57fa2027b9f254d4ae0cb650eef15525809ce Mon Sep 17 00:00:00 2001 From: Jakub Wilk Date: Mon, 24 Oct 2022 15:59:04 +0200 Subject: [PATCH] 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. --- README.md | 2 +- lychee-bin/tests/usage.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8bae0ba..154dfc9 100644 --- a/README.md +++ b/README.md @@ -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] ... diff --git a/lychee-bin/tests/usage.rs b/lychee-bin/tests/usage.rs index 2ccd088..e3c4bb3 100644 --- a/lychee-bin/tests/usage.rs +++ b/lychee-bin/tests/usage.rs @@ -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..]