mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 09:08:53 +01:00
Remove brackets from comments, strings and regexes before evaluating the indentation (#210641)
* wip * polishing the code * adding code * adding the language * reshuffling the code to avoid cyclic dependency * polihsing code * uncommenting tests * also adopting the indentation rules within the reindentation operation * using instead the sliced line tokens instead of the scoped line tokens * polishing the code * using start indices instead * using value everywhere * using the token data to type the tokens * setting to number instead of standard token type * using token data from autoindenttest.ts * using same code in both test files * placing instantiation service into the registerLanguage method * copying object into the node js autoindent.ts
This commit is contained in:
committed by
GitHub
parent
e3b7a27662
commit
d309e11579
@@ -111,10 +111,10 @@
|
||||
},
|
||||
"indentationRules": {
|
||||
"decreaseIndentPattern": {
|
||||
"pattern": "^((?!.*?/\\*).*\\*\/)?\\s*[\\}\\]\\)].*$"
|
||||
"pattern": "^\\s*[\\}\\]\\)].*$"
|
||||
},
|
||||
"increaseIndentPattern": {
|
||||
"pattern": "^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"
|
||||
"pattern": "^.*(\\{[^}]*|\\([^)]*|\\[[^\\]]*)$"
|
||||
},
|
||||
// e.g. * ...| or */| or *-----*/|
|
||||
"unIndentedLinePattern": {
|
||||
|
||||
Reference in New Issue
Block a user