From b25d8f346056ca4da0beb5fc44aa6080abd557dc Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 15 Aug 2024 23:18:08 +0200 Subject: [PATCH] [stylus mode] Fix some weird indentation --- mode/stylus.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mode/stylus.js b/mode/stylus.js index be81cec..20d2faa 100644 --- a/mode/stylus.js +++ b/mode/stylus.js @@ -709,11 +709,11 @@ export const stylus = { /^\s*\/(\/|\*)/.test(textAfter) || /^\s*\/\*/.test(prevLineFirstWord) || /^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(textAfter) || -/^(\+|-)?[a-z][\w-]*\(/i.test(textAfter) || -/^return/.test(textAfter) || - wordIsBlock(lineFirstWord)) { - indent = lineIndent; - } else if (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(ch) || wordIsTag(lineFirstWord)) { + /^(\+|-)?[a-z][\w-]*\(/i.test(textAfter) || + /^return/.test(textAfter) || + wordIsBlock(lineFirstWord)) { + indent = lineIndent; + } else if (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(ch) || wordIsTag(lineFirstWord)) { if (/\,\s*$/.test(prevLineFirstWord)) { indent = prevLineIndent; } else if (!state.sol() && (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(prevLineFirstWord) || wordIsTag(prevLineFirstWord))) {