Rule snippets formatting

Hi,

I am trying to format my rule snippet but couldn’t succed. Vincent told me I have to use space not TAB but in any case, this is not working. How should I format the file to get the correct formatting? Use escape characters (\b or \t) instead?

My Snippet:

[
  {
    value: @my SkipScaling
    snippet:
      '''	
		##############################################################################################################################
		#Region: Skip scaling
		[ 'Scale':{'BASE_div_1e3', 'BASE_div_1e6'} ] = C:
		IF ( ATTRS('${1:Measure Name}', !${1:Measure Name}, 'No Scaling' ) @= 'Y',
		    [ 'Scale':'BASE' ],
		    CONTINUE
		);
		#EndRegion: Skip scaling
		##############################################################################################################################
      '''
  }
]

Result:


Cache cleared.
Arc version: v2.2.0

Hi @Ulas,

Hjson, the format that is used for snippets in Arc, unfortunately doesn’t like the mixing of tab and space characters.

Code above:

You can try replacing the tab characters above (arrows) with normal spaces.

Then the result in Arc should (hopefully) be something like the below.

image

In notepadd++ you can activate the following to see all the ‘hidden’ characters

Thanks.

3 Likes

Thanks a lot @gpool!