Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.22 KB

indentation.md

File metadata and controls

53 lines (37 loc) · 1.22 KB

Code indentation

The code snippets will do smart trimming of snippet indentation.

For example given this snippet:

••// begin-snippet MySnippetName
••Line one of the snippet
••••Line two of the snippet
••// end-snippet

The leading two spaces (••) will be trimmed and the result will be:

Line one of the snippet
••Line two of the snippet

The same behavior will apply to leading tabs.

Do not mix tabs and spaces

If tabs and spaces are mixed there is no way for the snippets to work out what to trim.

So given this snippet:

••// begin-snippet MySnippetNamea
••Line one of the snippet
➙➙Line one of the snippet
••// end-snippet

Where ➙ is a tab.

The resulting markdown will be will be

Line one of the snippet
➙➙Line one of the snippet

Note that none of the tabs have been trimmed.