From 1db9ce8e7e6c62ccdc2dc96b3d99358f1f97b894 Mon Sep 17 00:00:00 2001 From: Alexandre ZANNI <16578570+noraj@users.noreply.github.com> Date: Sun, 9 Apr 2023 20:40:02 +0200 Subject: [PATCH] [chore] case insensitive regexp --- lib/docopt.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docopt.rb b/lib/docopt.rb index dee2744..ab3a75f 100644 --- a/lib/docopt.rb +++ b/lib/docopt.rb @@ -579,7 +579,7 @@ def parse_defaults(doc) end def printable_usage(doc) - usage_split = doc.split(/([Uu][Ss][Aa][Gg][Ee]:)/) + usage_split = doc.split(/(Usage:)/i) if usage_split.count < 3 raise DocoptLanguageError, '"usage:" (case-insensitive) not found.' end