From cc3896edb3b9c8dcea8072d1ed21d696ae84a0a6 Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Fri, 20 Dec 2024 13:12:10 +0000 Subject: [PATCH] - Fix view markers for user files --- lib/bashly/concerns/renderable.rb | 2 +- lib/bashly/views/command/parse_requirements_while.gtx | 2 +- lib/bashly/views/command/required_args_filter.gtx | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/bashly/concerns/renderable.rb b/lib/bashly/concerns/renderable.rb index 3a096169..56ae490b 100644 --- a/lib/bashly/concerns/renderable.rb +++ b/lib/bashly/concerns/renderable.rb @@ -32,7 +32,7 @@ def load_user_file(file, placeholder: true) '' end - Settings.production? ? content : "#{view_marker path}\n#{content}" + Settings.enabled?(:view_markers) ? "#{view_marker path}\n#{content}" : content end # Returns a path to a file in the user's source_dir. The file argument diff --git a/lib/bashly/views/command/parse_requirements_while.gtx b/lib/bashly/views/command/parse_requirements_while.gtx index bd67fed1..761167cb 100644 --- a/lib/bashly/views/command/parse_requirements_while.gtx +++ b/lib/bashly/views/command/parse_requirements_while.gtx @@ -40,4 +40,4 @@ end > > esac > done - +> diff --git a/lib/bashly/views/command/required_args_filter.gtx b/lib/bashly/views/command/required_args_filter.gtx index a18ed2fd..cf4fbf8a 100644 --- a/lib/bashly/views/command/required_args_filter.gtx +++ b/lib/bashly/views/command/required_args_filter.gtx @@ -7,7 +7,8 @@ if required_args.any? = render(:examples_on_error).indent 2 > exit 1 > fi + > end > -end +end \ No newline at end of file