From: Steve Hancock Date: Thu, 3 Sep 2020 00:49:24 +0000 (-0700) Subject: update -nib docs X-Git-Tag: 20200907~12 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=446e5f32a060026fe4d4cdd69cdce6968d958653;p=perltidy.git update -nib docs --- diff --git a/CHANGES.md b/CHANGES.md index ed03c49d..a438761c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,8 @@ # Perltidy Change Log - Added parameter --non-indenting-braces, or -nib, which prevents - code which follows an opening brace marked with a special side comment, - '#<<<', from indenting one level. For example, + code from indenting one level if it follows an opening brace marked + with a special side comment, '#<<<'. For example, { #<<< a closure to contain lexical vars diff --git a/bin/perltidy b/bin/perltidy index 39aed2d5..2685c505 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -851,7 +851,7 @@ The default is not to do this, indicated by B<-nicb>. =item B<-nib>, B<--non-indenting-braces> Normally, lines of code contained within a pair of block braces receive one -extra level of indentation. If this flag is set, perltidy will look for +additional level of indentation. If this flag is set, perltidy will look for opening block braces which are followed by a special side comment, which is B<#<<<> by default. If found, the code between this opening brace and its corresponding closing brace will not be given the normal extra indentation @@ -873,7 +873,8 @@ from causing all of their contained code to be reformatted if you run perltidy, you can mark the opening braces with this special side comment. Only the opening brace needs to be marked, since perltidy knows where the -closing brace is. +closing brace is. Braces contained within marked braces may also be marked +as non-indenting. This feature is on by default. If your code happens to have some opening braces followed by '#<<<', and you don't want this, you can use B<-nnib> to @@ -881,8 +882,7 @@ deactivate it. To make it easy to remember, the default string is the same as the string for starting a B section. There is no confusion because in that case it is for a block comment rather than a side-comment. -The special side comment can be changed with the next -parameter. +The special side comment can be changed with the next parameter. =item B<-nibp=s>, B<--non-indenting-brace-prefix=s>