From 2760234d3d8d1acba72a42df7763482655af5ebc Mon Sep 17 00:00:00 2001 From: Azat Alimov <32402726+mkslanc@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:15:53 +0400 Subject: [PATCH] fix: Change curly braces insertion behavior for Markdown to act the same as for other braces (#4994) --- src/mode/markdown.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mode/markdown.js b/src/mode/markdown.js index f2a067ebb72..3aab4155074 100644 --- a/src/mode/markdown.js +++ b/src/mode/markdown.js @@ -1,10 +1,8 @@ "use strict"; var oop = require("../lib/oop"); +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var XmlMode = require("./xml").Mode; -var HtmlMode = require("./html").Mode; var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules; var MarkdownFoldMode = require("./folding/markdown").FoldMode; @@ -21,7 +19,7 @@ var Mode = function() { }); this.foldingRules = new MarkdownFoldMode(); - this.$behaviour = this.$defaultBehaviour; + this.$behaviour = new CstyleBehaviour({ braces: true }); }; oop.inherits(Mode, TextMode);