From 1f514ec603b886e8d70d8b2a8462f73bf0dc8c52 Mon Sep 17 00:00:00 2001 From: nate stemen Date: Mon, 3 Feb 2020 09:12:19 -0500 Subject: [PATCH] Merge pull request #2550 from overleaf/jpa-strip-tex [autocomplete] input/include: strip the .tex extension GitOrigin-RevId: 15ae910e38717382a734848c33cbdb3c66a75ac9 --- .../directives/aceEditor/auto-complete/AutoCompleteManager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.js b/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.js index 30cd06b927..61a9021439 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.js @@ -107,9 +107,10 @@ define([ for (let file of Files.getTeXFiles()) { if (file.id !== this.$scope.docId) { const { path } = file + let cleanPath = path.replace(/(.+)\.tex$/i, '$1') result.push({ caption: `\\${commandName}{${path}}`, - value: `\\${commandName}{${path}}`, + value: `\\${commandName}{${cleanPath}}`, meta: 'file', score: 50 })