From 9958b29d287d696fcf3e92eb303bb9e878dab226 Mon Sep 17 00:00:00 2001 From: Nurlan Alkuatov Date: Mon, 13 Jun 2022 15:14:13 +0600 Subject: [PATCH] fixup! [#6] Add a switch for allowing comments --- core/src/Text/Interpolation/Nyan/Core.hs | 1 + core/src/Text/Interpolation/Nyan/Core/Internal/Parser.hs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/core/src/Text/Interpolation/Nyan/Core.hs b/core/src/Text/Interpolation/Nyan/Core.hs index c580a7d..e7374ce 100644 --- a/core/src/Text/Interpolation/Nyan/Core.hs +++ b/core/src/Text/Interpolation/Nyan/Core.hs @@ -33,6 +33,7 @@ module Text.Interpolation.Nyan.Core , recommendedDefaultSwitchesOptions -- ** Field accessors for default switches options , defSpacesTrimming + , defCommenting , defIndentationStripping , defLeadingNewlineStripping , defTrailingSpacesStripping diff --git a/core/src/Text/Interpolation/Nyan/Core/Internal/Parser.hs b/core/src/Text/Interpolation/Nyan/Core/Internal/Parser.hs index f41b444..097390e 100644 --- a/core/src/Text/Interpolation/Nyan/Core/Internal/Parser.hs +++ b/core/src/Text/Interpolation/Nyan/Core/Internal/Parser.hs @@ -226,6 +226,11 @@ switchesHelpMessage sopts = , ("S", "disable spaces trimming", Just False) ] + , helpOnOptions (defCommenting sopts) + [ ("c", "enable commenting", Just True) + , ("C", "disable commenting", Just False) + ] + , helpOnOptions (defIndentationStripping sopts) [ ("d", "enable indentation stripping", Just True) , ("D", "disable indentation stripping", Just False)