diff --git a/src/extension.js b/src/extension.js index 165bcb4..8aa55fd 100644 --- a/src/extension.js +++ b/src/extension.js @@ -10,7 +10,7 @@ exports.activate = function(context) { const document = editor.document; if (editor && document.languageId === "ruby" || document.languageId === "haml" || document.languageId === "erb") { - const pattern = /:?(["|']?(\w[^\w\s]?)+["|']?)+\s*?=>\s*/g + const pattern = /[\d|:((\w[^\w\s]?))]+\s*?=>\s*/g const replacement = "$1: "; let edit = new WorkspaceEdit();