Method GetFormattingEditsAfterKeystroke
- Namespace
- Alternet.Syntax.Parsers.TypeScript
- Assembly
- Alternet.Syntax.Parsers.TypeScript.v9.dll
GetFormattingEditsAfterKeystroke(int, string, bool, int, bool, out string)
When implemented by a class, gets the text changes for the part of document accordingly to the formatting rules.
IEnumerable<TextChange> GetFormattingEditsAfterKeystroke(int pos, string key, bool useSpaces, int spacesInTab, bool applyChanges, out string newText)
Parameters
pos
intCurrent position within the text.
key
stringCharacter being typed.
useSpaces
boolIndicates whether indentation string should contain spaces or tabs.
spacesInTab
intSpecifies number of spaces in tab.
applyChanges
boolForces to apply found changes to the new text.
newText
stringReceives formatted code.
Returns
- IEnumerable<TextChange>
List of TextChanges representing difference between old and new code.