mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2550 from overleaf/jpa-strip-tex
[autocomplete] input/include: strip the .tex extension GitOrigin-RevId: 15ae910e38717382a734848c33cbdb3c66a75ac9
This commit is contained in:
parent
ab175a340b
commit
1f514ec603
1 changed files with 2 additions and 1 deletions
|
@ -107,9 +107,10 @@ define([
|
||||||
for (let file of Files.getTeXFiles()) {
|
for (let file of Files.getTeXFiles()) {
|
||||||
if (file.id !== this.$scope.docId) {
|
if (file.id !== this.$scope.docId) {
|
||||||
const { path } = file
|
const { path } = file
|
||||||
|
let cleanPath = path.replace(/(.+)\.tex$/i, '$1')
|
||||||
result.push({
|
result.push({
|
||||||
caption: `\\${commandName}{${path}}`,
|
caption: `\\${commandName}{${path}}`,
|
||||||
value: `\\${commandName}{${path}}`,
|
value: `\\${commandName}{${cleanPath}}`,
|
||||||
meta: 'file',
|
meta: 'file',
|
||||||
score: 50
|
score: 50
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue