Merge pull request #2550 from overleaf/jpa-strip-tex

[autocomplete] input/include: strip the .tex extension

GitOrigin-RevId: 15ae910e38717382a734848c33cbdb3c66a75ac9
This commit is contained in:
nate stemen
2020-02-03 09:12:19 -05:00
committed by Copybot
parent ab175a340b
commit 1f514ec603
@@ -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
})