diff options
author | 2021-10-31 02:06:07 +0100 | |
---|---|---|
committer | 2021-10-31 19:26:15 +0100 | |
commit | d933f00be208a586143b35d06e689f94a6a6f7e6 (patch) | |
tree | d9d1eddd6058a48f5c5189a2d8bb1b77f2ab5579 /language-web/src/main/js/language/indentation.ts | |
parent | fix(web): fix server-side content assist filtering (diff) | |
download | refinery-d933f00be208a586143b35d06e689f94a6a6f7e6.tar.gz refinery-d933f00be208a586143b35d06e689f94a6a6f7e6.tar.zst refinery-d933f00be208a586143b35d06e689f94a6a6f7e6.zip |
feat(web): client support for transformation rules
Diffstat (limited to 'language-web/src/main/js/language/indentation.ts')
-rw-r--r-- | language-web/src/main/js/language/indentation.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/language-web/src/main/js/language/indentation.ts b/language-web/src/main/js/language/indentation.ts index 973b4a80..78f0a750 100644 --- a/language-web/src/main/js/language/indentation.ts +++ b/language-web/src/main/js/language/indentation.ts | |||
@@ -75,10 +75,13 @@ export function indentDeclaration(context: TreeIndentContext): number { | |||
75 | return indentDeclarationStrategy(context, 1); | 75 | return indentDeclarationStrategy(context, 1); |
76 | } | 76 | } |
77 | 77 | ||
78 | export function indentPredicate(context: TreeIndentContext): number { | 78 | export function indentPredicateOrRule(context: TreeIndentContext): number { |
79 | const clauseIndent = indentDeclarationStrategy(context, 1); | 79 | const clauseIndent = indentDeclarationStrategy(context, 1); |
80 | if (/^\s+(;|\.)/.exec(context.textAfter) !== null) { | 80 | if (/^\s+(;|\.)/.exec(context.textAfter) !== null) { |
81 | return clauseIndent - 2; | 81 | return clauseIndent - 2; |
82 | } | 82 | } |
83 | if (/^\s+(~>)/.exec(context.textAfter) !== null) { | ||
84 | return clauseIndent - 3; | ||
85 | } | ||
83 | return clauseIndent; | 86 | return clauseIndent; |
84 | } | 87 | } |