New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New TextPrefix function #3160
New TextPrefix function #3160
Conversation
I tested it with an adapted ErrorIfDeprecated()
which results for me this output
|
As another test I replaced in lib/_input-output-functions.sh
with
(plain 'TextPrefix' adds two spaces indentation). |
@rear/contributors |
@rear/contributors |
New TextPrefix function to remove leading space and tab characters from input lines and prefix each line with the argument string if specified. The intent is to be able to properly indent multi-line message strings in the code and output the message without the code indentation but prefixed as needed, see rear#3160
The new TextPrefix needs to be fixed
The fix is to escape all / with / in prefix
The fix will be done "by the way" |
Fix the TextPrefix function: In the prefix value escape all / by \/ otherwise sed -e "/.../.../" gets invalid syntax see #3160 (comment)
New TextPrefix function to remove leading space and tab characters from input lines and prefix each line with the argument string if specified. The intent is to be able to properly indent multi-line message strings in the code and output the message without the code indentation but prefixed as needed, see rear#3160
Type: Enhancement
Impact: Normal
Description of the changes in this pull request:
New TextPrefix function to
remove leading space and tab characters from input lines
and prefix each line with the argument string if specified.
The intent is to be able to properly indent multi-line message strings
in the code and output the message without the code indentation
but prefixed as needed for example like
which results the following output