TextUtility.NormalizeCodeBlock Method
- Namespace
- Kampute.DocToolkit.Support
- Assembly
- Kampute.DocToolkit.dll
Definition
Normalizes the text of a code block by removing leading and trailing empty lines, collapsing consecutive empty lines, and normalizing indentation.
public static string NormalizeCodeBlock(string text, int tabSize = 4)Parameters
textstring- The text to normalize.
tabSizeint optional- The number of spaces to replace each tab with. Default is 4.

nullor whitespace.